Skip to content

Reject path traversal in debian and rpm handlers#26

Merged
andrew merged 1 commit into
mainfrom
fix-path-traversal
Mar 13, 2026
Merged

Reject path traversal in debian and rpm handlers#26
andrew merged 1 commit into
mainfrom
fix-path-traversal

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Mar 12, 2026

The debian and rpm handlers pass the request path directly to the upstream URL without checking for ".." segments. A crafted request could reach unintended upstream paths.

Adds a containsPathTraversal check at the entry point of both handlers, returning 400 for any path with ".." segments.

The debian and rpm handlers take the request path and pass it directly
to the upstream URL without checking for ".." segments. This could let
a client craft a request that reaches unintended upstream paths.

Add a containsPathTraversal check at the entry point of both handlers
and return 400 for any path containing ".." segments.
@andrew andrew merged commit 68a8af5 into main Mar 13, 2026
5 checks passed
@andrew andrew deleted the fix-path-traversal branch March 26, 2026 09:30
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.

1 participant