CVE-2026-45065: Symfony/routing Symfony Has A UrlGenerator Route-Requirement Vulnerability
MODERATECVE-2026-45065 is a MODERATE symfony has a urlgenerator route-requirement vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Symfony/routing libraries in the Packagist ecosystem. The issue involves symfony has a urlgenerator route-requirement bypass via unanchored regex alternation → off-site //host url injection. Remediation is available by upgrading affected packages to version 5.4.52, 6.4.40, 7.4.12, 8.0.12.
CVE-2026-45065 at a Glance
How to Fix CVE-2026-45065
To remediate this vulnerability, upgrade all affected Symfony/routing dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade symfony/routing to 5.4.52
Upgrade symfony/routing to 6.4.40
Upgrade symfony/routing to 7.4.12
Upgrade symfony/routing to 8.0.12
Upgrade symfony/symfony to 5.4.52
Upgrade symfony/symfony to 6.4.40
Upgrade symfony/symfony to 7.4.12
Upgrade symfony/symfony to 8.0.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/routing
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-45065, inspect your project dependencies for Symfony/routing:
inspect dependencies for symfony/routing
Analyze the terminal output to locate any version of Symfony/routing in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.4.52), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Symfony/routing, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-45065 Affected Symfony/routing Versions
8 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/routing
|
Packagist |
< 5.4.52
|
5.4.52
|
|
symfony/routing
|
Packagist |
≥ 6.0.0
< 6.4.40
|
6.4.40
|
|
symfony/routing
|
Packagist |
≥ 7.0.0
< 7.4.12
|
7.4.12
|
|
symfony/routing
|
Packagist |
≥ 8.0.0
< 8.0.12
|
8.0.12
|
|
symfony/symfony
|
Packagist |
< 5.4.52
|
5.4.52
|
|
symfony/symfony
|
Packagist |
≥ 6.0.0
< 6.4.40
|
6.4.40
|
|
symfony/symfony
|
Packagist |
≥ 7.0.0
< 7.4.12
|
7.4.12
|
|
symfony/symfony
|
Packagist |
≥ 8.0.0
< 8.0.12
|
8.0.12
|
References
Frequently Asked Questions
What is CVE-2026-45065?
Which Symfony/routing versions are affected?
What version fixes CVE-2026-45065?
Is symfony/routing affected?
Is symfony/symfony affected?
What CWE is associated with CVE-2026-45065?
How can I check Packagist dependencies for CVE-2026-45065?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-72xp-p242-47p9",
"modified" : "2026-05-27T16:55:16Z",
"published" : "2026-05-27T16:55:16Z",
"aliases" : [ "CVE-2026-45065" ],
"summary" : "Symfony has a UrlGenerator Route-Requirement Bypass via Unanchored Regex Alternation → Off-Site //host URL Injection",
"details" : "### Description\n\nSymfony 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.\n\nUrlGenerator 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.\n\n### Resolution\n\nThe `UrlGenerator` class now wraps the requirement in a non-capturing group so the `^` and `$` anchors apply to the whole alternation.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/bcf487c22f3240ba994124e0e0fe8616f3cfc47a) for branch 5.4.\n\n### Credits\n\nSymfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.4.52"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.4.40"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.4.52"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.4.40"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-72xp-p242-47p9"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/bcf487c22f3240ba994124e0e0fe8616f3cfc47a"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/routing/CVE-2026-45065.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45065.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2026-45065"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-185", "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-27T16:55:16Z",
"nvd_published_at" : null
}
}