Symfony vulnerable to open redirect via browser-sanitized URLs
Impact
The Request class, does not parse URI with special characters the same way browsers do. As a result, an attacker can trick a validator relying on the Request class to redirect users to another domain.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| Earlier releases before 5.4.46Ecosystem versions | 5.4.46 |
| From 6.0.0 before 6.4.14Ecosystem versions | 6.4.14 |
| From 7.0.0 before 7.1.7Ecosystem versions | 7.1.7 |
Version evidence: OSV · GHSA-mrqx-rp3w-jpjp
View original version evidence (663 explicit versions)
Original source description
Description
The Request class, does not parse URI with special characters the same way browsers do. As a result, an attacker can trick a validator relying on the Request class to redirect users to another domain.
Resolution
The Request::create methods now assert the URI does not contain invalid characters as defined by https://url.spec.whatwg.org/
The patch for this issue is available here for branch 5.4.
Credits
We would like to thank Sam Mush - IPASSLab && ZGC Lab for reporting the issue and Nicolas Grekas for providing the fix.
References
- Security advisory github.com/symfony/symfony/security/advisories/GHSA-mrqx-rp3w-jpjp
- Security advisory nvd.nist.gov/vuln/detail/CVE-2024-50345
- Patch github.com/symfony/symfony/commit/5a9b08e5740af795854b1b639b7d45b9cbfe8819
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-foundation/CVE-2024-50345.yaml
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2024-50345.yaml
- Source reference github.com/symfony/symfony
- Source reference lists.debian.org/debian-lts-announce/2025/05/msg00051.html
- Security advisory symfony.com/cve-2024-50345
- Source reference url.spec.whatwg.org/