Trailing-Slash and Scheme Redirects Send Paths Starting With // to Another Host
- CVE-2026-133745
- EUVD-2026-135234
Description
The router redirects a request to the same URL with or without its trailing slash, or with the scheme that a route requires. To do so, the matcher returns RedirectController::urlRedirectAction() with the path info of the request as path. Since Symfony 5.4.44, 6.4.12 and 7.1.5, urlRedirectAction() turns a path that starts with // into <scheme>://..., so that protocol-relative targets configured in routes work. The path info of a request starts with // when its URI does. So these redirects send the browser to the host written at the start of the path: GET https://app.example//evil.example/edit/ => 301 Location: https://evil.example/edit This affects routes whose path starts with a placeholder that accepts /, like /{path}/edit with the .+ requirement. The trailing-slash redirect applies to all of them, and the scheme redirect to the ones that require a scheme. A front controller in a subdirectory doesn't prevent it. The matcher now encodes the slash or backslash that follows the leading slash of the path it redirects to, as %2F or %5C. It also does so when tabs or newlines come in between. The target route still matches it, and protocol-relative targets configured in routes keep working. The matchers of the Routing component encode it too before calling RedirectableUrlMatcherInterface::redirect(), so that other implementations of this method get the encoded path as well.
Text from the CVE.org record.
Recommendation
Symfony symfony/framework-bundle
- If you run a version from 8.0.0 to before 8.1.12update to 8.1.12 or laterMinor version change: check the release notes
- If you run a version from 7.1.5 to before 7.4.24update to 7.4.24 or laterMinor version change: check the release notes
- If you run 6.4.xupdate to 6.4.51 or laterPatch update: breaking changes are unlikely
- If you run 5.4.xupdate to 5.4.57 or laterPatch update: breaking changes are unlikely
Symfony symfony/symfony
- If you run a version from 8.0.0 to before 8.1.12update to 8.1.12 or laterMinor version change: check the release notes
- If you run a version from 7.1.5 to before 7.4.24update to 7.4.24 or laterMinor version change: check the release notes
- If you run 6.4.xupdate to 6.4.51 or laterPatch update: breaking changes are unlikely
- If you run 5.4.xupdate to 5.4.57 or laterPatch update: breaking changes are unlikely
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Symfony symfony/framework-bundle
Affected versions Fixed in from 8.0.0 to before 8.1.12 8.1.12 from 7.1.5 to before 7.4.24 7.4.24 from 6.4.12 to before 6.4.51 6.4.51 from 5.4.44 to before 5.4.57 5.4.57 Symfony symfony/symfony
Affected versions Fixed in from 8.0.0 to before 8.1.12 8.1.12 from 7.1.5 to before 7.4.24 7.4.24 from 6.4.12 to before 6.4.51 6.4.51 from 5.4.44 to before 5.4.57 5.4.57
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.