Skip to content
Laskyr

symfony/http-foundation security advisory

CVE-2026-135802: Generated URLs Can Point to a Host Chosen by the Client in symfony/http-foundation

CVE-2026-135802 is an open redirect vulnerability in the PHP package symfony/http-foundation, published 24 November 2026. It is fixed in 5.4.56, 6.4.50, 7.4.23 and 8.1.11, one per release line; earlier versions on each line are affected.

published 2026-11-24

Not scored yet

Fixed in symfony/http-foundation 5.4.56, 6.4.50, 7.4.23 and 8.1.11

This open redirect issue affects symfony/http-foundation in 4 release lines: >= 2.0.0, < 5.4.56; >= 6.0.0, < 6.4.50; >= 7.0.0, < 7.4.23; >= 8.0.0, < 8.1.11. Upgrade to the fixed version for your release line (5.4.56, 6.4.50, 7.4.23 and 8.1.11). The newest release, 8.2.0, is not affected.

Affected versions
>= 2.0.0, < 5.4.56
>= 6.0.0, < 6.4.50
>= 7.0.0, < 7.4.23
>= 8.0.0, < 8.1.11
Fixed in
5.4.56, 6.4.50, 7.4.23, 8.1.11
Newest release
8.2.0
Type
Open redirect
CWE-601, CWE-829
Exploited in the wild
Not on the CISA KEV list
checked 2026-11-29

Also affects

The same advisory covers another package in our list. Fix whichever one your project installs.

Is your symfony/http-foundation version affected?

Run composer show symfony/http-foundation in your project, then enter the version. We check it against this and every other known symfony/http-foundation advisory.

Who can exploit CVE-2026-135802

The record does not say what access is needed yet. Until it is scored, assume anyone who can reach your app can try it.

Your app is only exposed if it uses the affected part of symfony/http-foundation. The advisory below says which part that is. If you are not sure, upgrade anyway: it costs less than finding out.

Technical details

Weakness

Open redirect CWE-601CWE-829

A redirect takes its destination from input without properly restricting it.

A link on a trusted domain can send visitors to a phishing or malware site.

General description of this issue type. The advisory below covers this bug.

How to fix CVE-2026-135802 in symfony/http-foundation

  1. Find the installed version: composer show symfony/http-foundation. If you never required it yourself, composer why symfony/http-foundation shows which package pulls it in.
  2. Update it: composer update symfony/http-foundation --with-all-dependencies. You need the fixed version for your release line (5.4.56, 6.4.50, 7.4.23 and 8.1.11).
  3. If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example "symfony/http-foundation": "^8.1.11" if you can take that version), or upgrade the package that requires it.
  4. Run composer audit. It reads the same advisory data and should no longer list CVE-2026-135802.
  5. Commit composer.lock and deploy it. On the server, run composer install --no-dev from the lock file, not composer update.

If you cannot upgrade yet

General hardening for open redirect issues while the upgrade waits. None of it replaces the fix.

Is your project exposed to CVE-2026-135802?

Check the one package here, or check everything your project installs at once.

  1. Check symfony/http-foundation Enter your installed version and compare it with every known symfony/http-foundation advisory. Check my version
  2. Check your whole composer.lock The free checker compares every locked package with the same advisory data composer audit uses. Check composer.lock

The CVE-2026-135802 advisory

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 /\.

Description from the CVE record, via the NVD entry for CVE-2026-135802. Advisory title: “CVE-2026-135802: Generated URLs Can Point to a Host Chosen by the Client”.

References

Other symfony/http-foundation advisories

Related

Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.

Ask about a fix

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit

The box is optional and does not affect the kit. Privacy policy.