CVE-2026-45065

Symfony: UrlGenerator Route-Requirement Bypass via Unanchored Regex Alternation → Off-Site //host URL Injection

Published Jul 14, 2026 CVSS 4.0 · 2.3 Low EPSS < 1% KEV · Not listed
Description
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, UrlGenerator validates route parameters against a pattern built as ^ plus the raw requirement plus $; with ungrouped alternations, middle alternatives match as unanchored substrings, allowing a value such as //evil.com to satisfy a common locale requirement and generate a protocol-relative off-site URL. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.

Analysis

AI-generated

Technical impact

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Up to versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12, the UrlGenerator component validates route parameters against a pattern constructed as ^ plus the raw requirement plus $. Due to the use of ungrouped alternations, the middle alternatives match as unanchored substrings, allowing a value such as //evil.com to satisfy a common locale requirement and produce a protocol‑relative off‑site URL. This flaw permits attackers to inject protocol‑relative URLs that redirect users to external sites, effectively creating an off‑site URL injection vulnerability. The issue is an input validation weakness (CWE‑185, CWE‑601).

Affected Systems

The issue affects the Symfony framework distributed by the symfony vendor. Versions earlier than 5.4.52, 6.4.40, 7.4.12, and 8.0.12 are vulnerable; all newer releases contain the fix.

Risk and Exploitability

The CVSS score is 2.3 and the EPSS score is below 1%; the vulnerability is not listed in KEV. Because the flaw requires an attacker to craft a URL that targets a routing component, the likelihood of exploitation is low under current conditions. If exploitation were achieved, the attacker could inject an external link that appears to originate from the application, potentially misleading users or delivering malware. The low CVSS and EPSS suggest a low‑risk scenario, but the presence of an open redirect path merits cautious monitoring.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Symfony to version 5.4.52, 6.4.40, 7.4.12, 8.0.12 or newer, or apply the vendor patch where applicable.
  • If an upgrade is not feasible, constrain the locale or route parameter to a strict whitelist of allowed values to all external URLs generated by the application, rejecting protocol-relative or host-redirect URLs before they are sent to the client.
  • Perform a security review of all custom URL generation logic to verify that route parameters are properly validated and do not rely on unanchored regex alternations.

Generated by OpenCVE AI on July 31, 2026 at 05:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6312-1 symfony security update
Debian DSA Debian DSA DSA-6317-1 symfony security update
Github GHSA Github GHSA GHSA-72xp-p242-47p9 Symfony has a UrlGenerator Route-Requirement Bypass via Unanchored Regex Alternation → Off-Site //host URL Injection
History
Type Values Removed Values Added
First Time appeared Symfony
Symfony symfony
Vendors & Products Symfony
Symfony symfony
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, UrlGenerator validates route parameters against a pattern built as ^ plus the raw requirement plus $; with ungrouped alternations, middle alternatives match as unanchored substrings, allowing a value such as //evil.com to satisfy a common locale requirement and generate a protocol-relative off-site URL. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.
Title Symfony: UrlGenerator Route-Requirement Bypass via Unanchored Regex Alternation → Off-Site //host URL Injection
Weaknesses CWE-185
CWE-601
References
Metrics cvssV4_0

{'score': 2.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}

Weaknesses
  • CWE-185

    Incorrect Regular Expression

  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 14, 2026, 7:51 PM
Reserved
May 8, 2026, 6:45 PM
Status
Analyzed
Published
Jul 14, 2026, 6:17 PM
Modified
Jul 15, 2026, 2:14 PM