Skip to content

Fix to prevent path traversal in Static Routes when rooted paths are used#1676

Merged
Badgerati merged 3 commits intodevelopfrom
Issue-1667
Apr 12, 2026
Merged

Fix to prevent path traversal in Static Routes when rooted paths are used#1676
Badgerati merged 3 commits intodevelopfrom
Issue-1667

Conversation

@Badgerati
Copy link
Copy Markdown
Owner

Description of the Change

Ensures that rooted paths cannot be provided when requesting static content from the server, and therefore preventing path traversal.

Achieved in two ways:

  • Use Path.IsPathRooted on child paths before using Path.Combine
  • Ensure the result path has the expected Pode drive source after combining

Related Issue

Resolves #1667

@Badgerati Badgerati added this to the 2.13.0 milestone Apr 11, 2026
@Badgerati Badgerati self-assigned this Apr 11, 2026
@Badgerati Badgerati merged commit f1d56ad into develop Apr 12, 2026
23 checks passed
@Badgerati Badgerati deleted the Issue-1667 branch April 12, 2026 13:31
@Badgerati Badgerati mentioned this pull request Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulnerable Add-PodeStaticRoute

1 participant