Skip to content

Track protocol-relative redirects in the SSRF check - #811

Open
iacobdaniel wants to merge 2 commits into
mainfrom
fix/relative-redirect-location
Open

iacobdaniel wants to merge 2 commits into
mainfrom
fix/relative-redirect-location

Conversation

@iacobdaniel

@iacobdaniel iacobdaniel commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

A redirect whose Location has no scheme, such as //127.0.0.1/test or /path, was dropped before it was recorded, so a protocol-relative redirect to a private address was not reported. The location is resolved against the request URL first, the same way requests, urllib3 and urllib.request resolve it when they follow the redirect, and an absolute location gives the same result as before. The tests cover the exact resolved URL for a protocol-relative and a relative location, the detection after a protocol-relative redirect over HTTP and HTTPS, and the redirect test server's /ssrf-test-protocol-relative routes.

@iacobdaniel iacobdaniel changed the title Resolve relative redirect locations against the request URL Track protocol-relative redirects in the SSRF check Nov 27, 2026

This branch has not been deployed

No deployments
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