Login Redirects Can Still Reach Another Host When the Session Cookie Domain Is Set: Incomplete Fix for CVE-2017-16652
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Symfonysymfony/security-http |
< 5.4.57→ 5.4.57 ≥ 6.0.0, < 6.4.51→ 6.4.51 ≥ 7.0.0, < 7.4.24→ 7.4.24 ≥ 8.0.0, < 8.1.12→ 8.1.12 |
5.4.57 6.4.51 7.4.24 8.1.12 |
| Symfonysymfony/symfony |
< 5.4.57→ 5.4.57 ≥ 6.0.0, < 6.4.51→ 6.4.51 ≥ 7.0.0, < 7.4.24→ 7.4.24 ≥ 8.0.0, < 8.1.12→ 8.1.12 |
5.4.57 6.4.51 7.4.24 8.1.12 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-134790 symfony Fix available
Original description The description as published by the source.
The fix for CVE-2017-16652 restricts the redirects of HttpUtils::createRedirectResponse() to the host of the request. When framework.session.cookie_domain is set, it also allows the subdomains of that domain. To check a target, it read the host of the URL up to the first "/". But browsers also end the host at "", "?" and "#". So with the cookie domain .example.com, a target like https://evil.test?.example.com passed the check, and the browser went to evil.test.
Applications are exposed when framework.session.cookie_domain is set. The default success and failure handlers of form_login redirect to the _target_path or _failure_path of the request. A login link can then send the user to another site right after a successful login, for example to ask for the password again.
HttpUtils now ends the host of a target where browsers do, before checking it against the allowed domains.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory symfony.com
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- web packagist.org