Open Redirect Affecting symfony/http-foundation package, versions <5.4.56>=6.0.0, <6.4.50>=7.0.0, <7.4.23>=8.0.0, <8.1.11


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.7% (49th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Open Redirect vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-SYMFONYHTTPFOUNDATION-23188938
  • published1 Dec 2026
  • disclosed24 Nov 2026
  • creditUnknown

Introduced: 24 Nov 2026

NewCVE-2026-135802  (opens in a new tab)
CWE-601  (opens in a new tab)

How to fix?

Upgrade symfony/http-foundation to version 5.4.56, 6.4.50, 7.4.23, 8.1.11 or higher.

Overview

symfony/http-foundation is a component defines an object-oriented layer for the HTTP specification.

Affected versions of this package are vulnerable to Open Redirect via Request::getBaseUrl(), which, when it cannot find the script name at the start of the request URI, searches further into the path and retains everything before the script name as the base URL. A request URI starting with // or /\ causes the base URL to incorporate an attacker-controlled host. With SCRIPT_NAME=/public/index.php, a request for //evil.example/public/index.php/login produces the base URL //evil.example/public/index.php, causing all generated URLs - including links built with path(), form actions, redirectToRoute() redirects, and asset() references - to point to the attacker's host. An attacker can exploit this to steal credentials via a hijacked login form, redirect users to a malicious site, or load attacker-controlled scripts.

Note: Applications are only affected when their front controller is in a subdirectory and the web server sends URIs that do not start with that directory (e.g. via a root .htaccess rewrite to public/), or when the web server sets SCRIPT_NAME to the full request path (e.g. certain nginx configurations without fastcgi_split_path_info, or php -S with a router script outside the document root). The configurations recommended in the Symfony documentation are not affected.

CVSS Base Scores

version 4.0
version 3.1