Skip to content

Conversation

@bluefchen
Copy link

fix http://localhost:port?file=../../../../etc/passwd can open passwd

  • Use path.resolve(ProjectRootPath, file) to normalize incoming paths
  • Ensure the resolved path stays within ProjectRootPath
  • Block traversal patterns like ?file=../../../../etc/passwd

@zh-lx zh-lx closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants