Skip to main content

Symfony Routing CVE-2026-45065

| EUVDEUVD-2026-44323 LOW
Incorrect Regular Expression (CWE-185)
2026-05-27 https://github.com/symfony/symfony GHSA-72xp-p242-47p9
2.3
CVSS 4.0 · Vendor: https://github.com/symfony/symfony
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify i18n route with multi-value alternation requirement
  2. Delivery
    Craft parameter containing middle-alternative substring (e.g., /evil.com matching vi)
  3. Exploit
    Submit value to Symfony path()/url() generation
  4. Install
    UrlGenerator bypasses regex validation
  5. C2
    Protocol-relative URL //evil.com/... is generated
  6. Execute
    User follows injected URL to attacker domain
  7. Impact
    Phishing or credential harvesting succeeds

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Incorrect input validation
Exploitation Conditions

Exploitation requires three concurrent conditions: (1) at least one route in the application defines a parameter requirement as a regex alternation with three or more alternatives where at least one middle alternative appears as a substring of a crafted attacker value (e.g., vi within /evil.com); (2) the application passes an externally influenced parameter value - from user input, query string, API payload, or similar - to UrlGenerator via path()/url() Twig helpers or direct generator calls without prior sanitization or allowlisting; and (3) the generated URL is subsequently rendered in a template response or used as an HTTP redirect target that a user will follow. Exploitation is limited by: two-alternative requirements are not vulnerable because both alternatives are anchored; the strictRequirements setting must be non-null (if explicitly set to null/disabled, validation is skipped entirely and a different, more permissive code path is used); and the application architecture must actually use UrlGenerator output as a navigable URL rather than purely for internal routing. Authentication requirements are not confirmed from available data, as no CVSS vector is provided.

Impact

No CVSS vector or EPSS score is available for this CVE, precluding quantitative risk ranking from standard scoring signals. The impact classification in advisory metadata is 'Information Disclosure,' though the actual attack outcome - open redirect enabling phishing, credential harvesting, or session token theft via protocol-relative URL injection - more accurately constitutes an integrity and availability risk to end users. The vulnerability is not listed in CISA KEV, and no public exploit code is identified at time of analysis. The realistic attack surface is significant: the trigger pattern (multi-value alternation in route requirements) is extremely common in internationalized Symfony applications using _locale parameters, and the advisory covers every currently supported Symfony branch (5.4.x, 6.x, 7.x, 8.x). Exploitation requires the application to pass externally influenced values to UrlGenerator and render or redirect using the output, which is a non-default but architecturally common pattern. Despite the absence of active exploitation signals, the breadth of the affected version range, clarity of the attack mechanism from the public advisory, and prevalence of the trigger configuration make this a real patching priority for i18n-enabled Symfony deployments.

Exploit ScenarioDerived

An attacker targeting an internationalized Symfony application identifies a route such as /{_locale}/blog with a _locale requirement of en|fr|vi|de. By supplying the parameter value /evil.com - which contains vi as a substring and satisfies the unanchored middle-alternative regex - the attacker causes UrlGenerator to generate the URL //evil.com/blog. When this URL is rendered in a Twig template via path() or used in an HTTP redirect response, the browser interprets //evil.com as a protocol-relative URL and navigates to the attacker-controlled domain, enabling a phishing page or credential-harvesting attack against the application's users. No public exploit code is identified at time of analysis, but the attack is mechanically straightforward given the fully detailed public advisory and patch diff.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 27, 2026

Protocol-relative URL injection in Symfony's UrlGenerator allows open redirect via regex alternation bypass in route parameter validation. When route requirements use alternation patterns (e.g., _locale: 'en|fr|vi|de'), the validation regex #^REQUIREMENT$# fails to anchor middle alternatives due to regex operator precedence, enabling substring matching against attacker-supplied values. An attacker who can influence route parameters fed into the Twig path()/url() helpers can inject a value like /evil.com - which satisfies the requirement by containing vi as a substring - causing UrlGenerator to produce //evil.com/..., a protocol-relative URL the browser navigates off-site. No public exploit is identified at time of analysis, and the vulnerability is not listed in CISA KEV; patches are released across all supported Symfony branches.

RemediationAI

Upgrade the Symfony Routing component to the patched version for your branch: 5.4.52 for 5.4.x, 6.4.40 for 6.x, 7.4.12 for 7.x, or 8.0.12 for 8.x, as confirmed by the GHSA advisory at https://github.com/symfony/symfony/security/advisories/GHSA-72xp-p242-47p9 and the upstream patch commit at https://github.com/symfony/symfony/commit/bcf487c22f3240ba994124e0e0fe8616f3cfc47a. If an immediate framework upgrade is not feasible, a targeted compensating control is to audit all route definitions and explicitly group alternation requirements using a non-capturing group - replacing _locale: 'en|fr|vi|de' with _locale: '(?:en|fr|vi|de)' directly in route configuration files. This replicates the framework-level fix at the route definition layer and does not require a Symfony upgrade, though it demands manual review of every route using alternation requirements and will not protect against future route additions that omit the grouping. An additional defense-in-depth measure is to validate and allowlist route parameter inputs at the application boundary (e.g., in form handling or API controllers) before values reach UrlGenerator, reducing reliance on the regex validation layer entirely.

Affected VersionsENISA

symfony < 5.4.52
symfony 8.0.0-BETA1, < 8.0.12
symfony 6.0.0-BETA1, < 6.4.40
symfony 7.0.0-BETA1, < 7.4.12

Affected Packages

composer symfony/routing fix: 5.4.52, 6.4.40, 7.4.12, 8.0.12
composer symfony/symfony fix: 5.4.52, 6.4.40, 7.4.12, 8.0.12
euvd symfony fix: 5.4.52
euvd symfony_6_0_0_beta1 fix: 6.4.40
euvd symfony_7_0_0_beta1 fix: 7.4.12
euvd symfony_8_0_0_beta1 fix: 8.0.12

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 6 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw resides in src/Symfony/Component/Routing/Generator/UrlGenerator.php within the doGenerate() method, specifically in the preg_match call that validates route parameter values against declared requirements. The root cause is CWE-185 (Incorrect Regular Expression): the validation pattern is constructed as #^REQUIREMENT$#, but PHP regex operator precedence means the alternation operator | binds more tightly than ^ and $ anchors. For a requirement like en|fr|vi|de, the compiled pattern is effectively (^en)|(fr)|(vi)|(de$) - only the first and last alternatives are anchored, while middle alternatives (fr, vi) match as unanchored substrings anywhere in the input. The fix, confirmed by the upstream patch commit, wraps the requirement in a non-capturing group: #^(?:REQUIREMENT)$#, ensuring anchors apply to the full alternation. The affected packages are composer/symfony/routing and composer/symfony/symfony across all active version branches.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/symfony/symfony) PRIMARY 2.3 LOW
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

Primary rating from Vendor (https://github.com/symfony/symfony) · only source for this CVE.

CVSS VectorVendor: https://github.com/symfony/symfony

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jul 14, 2026 - 18:22 NVD
2.3 (LOW)

DescriptionCVE.org

Description

Symfony routes can declare a requirements regex per path parameter, e.g. a route /{_locale}/blog with requirements: { _locale: 'en|fr|de' }. The Twig path() / url() helpers (backed by UrlGenerator) validate supplied parameter values against that regex before building the URL.

UrlGenerator constructs the validation pattern as '#^'.$req.'$#', where $req is the raw requirement string. For a requirement expressed as an alternation, e.g. _locale: 'ar|bg|...|vi|...|zh_CN' (very common), ^ and $ anchor only the first and last alternatives, so any middle alternative matches as an unanchored substring. A value like /evil.com satisfies the requirement (because it contains vi), and the generated path becomes //evil.com/...: a protocol-relative URL the browser navigates off-site.

Resolution

The UrlGenerator class now wraps the requirement in a non-capturing group so the ^ and $ anchors apply to the whole alternation.

The patch for this issue is available here for branch 5.4.

Credits

Symfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy