CVE-2026-135802
CVE-2026-135802 · Generated URLs Can Point to a Host Chosen by the Client
CVSS 8.1 · High · EPSS 0.7% · Fix available
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- symfony/http-foundationUpdate to 5.4.56 / 6.4.50 / 7.4.23 …
- symfony/symfonyUpdate to 5.4.56 / 6.4.50 / 7.4.23 …
- symfony Ubuntu 16.04 LTSNo fix published
- symfony Ubuntu Pro 18.04 LTSNo fix published
- and 5 more
Check the installed version:
dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="symfony"'Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
When Request::getBaseUrl() does not find the script name at the start of the request URI, it looks for it further into the path. This supports web servers that rewrite every URL to a front controller in a subdirectory. The base URL then kept everything before the script name, and the client chooses that part. A request URI starting with // or /\ made the base URL start with a host.
With SCRIPT_NAME=/public/index.php, a request for //evil.example/public/index.php/login is routed to /login, with the base URL //evil.example/public/index.php and the base path //evil.example/public. The URLs generated for that page then point to evil.example:
- links built with path() and the actions of forms, so a login form sends the credentials of the user to evil.example;
- redirects to generated URLs, such as the ones of redirectToRoute();
- assets referenced with a relative path through asset(), so the page can load scripts from evil.example.
The attacker has to make a user follow a crafted link, such as https://app.example//evil.example/public/index.php/login. framework.trusted_hosts does not help, since the host of the request is the real one.
Applications are affected when their front controller is in a subdirectory and the web server sends it URIs that do not start with that directory. A .htaccess file at the root of the project that rewrites every URL to public/ does that, for instance.
Applications are also affected when the web server sets SCRIPT_NAME to the path of the request. Some nginx configurations do that when they send every request to the front controller without fastcgi_split_path_info. php -S does it too, with a router script outside the document root. A request for /\evil.example/index.php then gets the base URL /\evil.example/index.php, which browsers read as a link to evil.example.
The configurations recommended in the Symfony documentation are not affected.
Request::getBaseUrl() now returns an empty base URL when the request URI starts with // or /\.
- Published
- Updated
Stack: system
Affected products and versions
symfony/http-foundation
- Versions
- ≥ 0, < 5.4.56: Affected (semver)
- ≥ 6.0.0, < 6.4.50: Affected (semver)
- ≥ 7.0.0, < 7.4.23: Affected (semver)
- ≥ 8.0.0, < 8.1.11: Affected (semver)
Update to 5.4.56; Update to 6.4.50; Update to 7.4.23; Update to 8.1.11
symfony/symfony
- Versions
- ≥ 0, < 5.4.56: Affected (semver)
- ≥ 6.0.0, < 6.4.50: Affected (semver)
- ≥ 7.0.0, < 7.4.23: Affected (semver)
- ≥ 8.0.0, < 8.1.11: Affected (semver)
Update to 5.4.56; Update to 6.4.50; Update to 7.4.23; Update to 8.1.11
symfony Ubuntu 16.04 LTS
- Versions
- 2.7.1+dfsg-1
- 2.7.5+dfsg-1
- 2.7.9+dfsg-1
- 2.7.9+dfsg-1ubuntu2
- 2.7.10-0ubuntu2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
symfony Ubuntu Pro 18.04 LTS
- Versions
- 2.8.7+dfsg-1.3ubuntu1
- 3.4.3+dfsg-1ubuntu4
- 3.4.6+dfsg-1
- 3.4.6+dfsg-1ubuntu0.1
- 3.4.6+dfsg-1ubuntu0.1+esm1
- 3.4.6+dfsg-1ubuntu0.1+esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
symfony Ubuntu Pro 20.04 LTS
- Versions
- 4.3.4+dfsg-1ubuntu1
- 4.3.8+dfsg-1ubuntu1
- 4.3.8+dfsg-1ubuntu1+esm1
- 4.3.8+dfsg-1ubuntu1+esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
symfony Ubuntu Pro 22.04 LTS
- Versions
- 5.2.6+dfsg-1ubuntu7
- 5.4.4+dfsg-1ubuntu8
- 5.4.4+dfsg-1ubuntu8+esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
symfony Ubuntu Pro 24.04 LTS
- Versions
- 5.4.23+dfsg-1ubuntu1
- 5.4.35+dfsg-3ubuntu1
- 6.4.5+dfsg-3ubuntu2
- 6.4.5+dfsg-3ubuntu3
- 6.4.5+dfsg-3ubuntu3+esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
symfony Ubuntu 26.10
- Versions
- 7.4.7+dfsg-1ubuntu1
- 7.4.9+dfsg-1ubuntu1
- 7.4.13+dfsg-2ubuntu1
- 7.4.14+dfsg-1ubuntu2
- 7.4.15+dfsg-2ubuntu2
- 7.4.16+dfsg-1ubuntu2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
symfony Ubuntu 26.04 LTS
- Versions
- 6.4.24+dfsg-1
- 7.4.5+dfsg-1ubuntu1
- 7.4.6+dfsg-2ubuntu1
- 7.4.7+dfsg-1ubuntu1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published