cve.bz

CVE-2026-135802 Generated URLs Can Point to a Host Chosen by the Client

no score yet

symfony: no CVSS score yet.

On this page
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 /\.
CWEs
CWE-601 URL Redirection to Untrusted Site (Open Redirect)
CWE-829 Inclusion of Functionality from Untrusted Control Sphere
OWASP Top 10
A01:2025 Broken Access Control, A08:2025 Software or Data Integrity Failures
Published
Assigned by
Symfony (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-135802 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-135802?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-135802?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-135802 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
symfony/http-foundationbefore 5.4.56
symfony/http-foundationfrom 6.0.0 before 6.4.50
symfony/http-foundationfrom 7.0.0 before 7.4.23
symfony/http-foundationfrom 8.0.0 before 8.1.11
symfony/symfonybefore 5.4.56
symfony/symfonyfrom 6.0.0 before 6.4.50
symfony/symfonyfrom 7.0.0 before 7.4.23
symfony/symfonyfrom 8.0.0 before 8.1.11

Attack patterns (CAPEC)

  • CAPEC-178 Cross-Site Flashing Likelihood: Medium · Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-829 (13).

References

Check your stackJSON