CVE-2026-118516: Symfony Host Placeholders Can Match The Vulnerability
MODERATECVE-2026-118516 is a MODERATE host placeholders can match the vulnerability (CWE-436: Interpretation Conflict) affecting Symfony libraries in the Packagist ecosystem. The issue involves host placeholders can match the start of the path in compiled url matchers, bypassing path-based access control. Remediation is available by upgrading affected packages to version 5.4.56, 6.4.50, 7.4.23, 8.1.11.
CVE-2026-118516 at a Glance
How to Fix CVE-2026-118516
To remediate this vulnerability, upgrade all affected Symfony 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.56
Upgrade symfony/routing to 6.4.50
Upgrade symfony/routing to 7.4.23
Upgrade symfony/routing to 8.1.11
Upgrade symfony/symfony to 5.4.56
Upgrade symfony/symfony to 6.4.50
Upgrade symfony/symfony to 7.4.23
Upgrade symfony/symfony to 8.1.11
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-118516, inspect your project dependencies for Symfony:
inspect dependencies for symfony/routing
Analyze the terminal output to locate any version of Symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.4.56), 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-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. In Symfony, 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-118516 Affected Symfony Versions
8 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/routing
|
Packagist |
< 5.4.56
|
5.4.56
|
|
symfony/routing
|
Packagist |
≥ 6.0.0
< 6.4.50
|
6.4.50
|
|
symfony/routing
|
Packagist |
≥ 7.0.0
< 7.4.23
|
7.4.23
|
|
symfony/routing
|
Packagist |
≥ 8.0.0
< 8.1.11
|
8.1.11
|
|
symfony/symfony
|
Packagist |
< 5.4.56
|
5.4.56
|
|
symfony/symfony
|
Packagist |
≥ 6.0.0
< 6.4.50
|
6.4.50
|
|
symfony/symfony
|
Packagist |
≥ 7.0.0
< 7.4.23
|
7.4.23
|
|
symfony/symfony
|
Packagist |
≥ 8.0.0
< 8.1.11
|
8.1.11
|
References
Frequently Asked Questions
What is CVE-2026-118516?
Which Symfony versions are affected?
What version fixes CVE-2026-118516?
Is symfony/routing affected?
Is symfony/symfony affected?
What CWE is associated with CVE-2026-118516?
How can I check Packagist dependencies for CVE-2026-118516?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xqw3-x93m-887x",
"modified" : "2026-12-01T21:13:26Z",
"published" : "2026-12-01T21:13:26Z",
"aliases" : [ "CVE-2026-118516" ],
"summary" : "Symfony: Host Placeholders Can Match the Start of the Path in Compiled URL Matchers, Bypassing Path-Based Access Control",
"details" : "### Description\n\nFor routes that have a host, `CompiledUrlMatcher` matches the string `$host.'.'.$pathinfo` against the host regexp followed by the path regexp. A host placeholder could match `/`, so it could eat the start of the path, while `UrlMatcher` matches the host and the path separately and finds no route. Rules that look at the path, such as `access_control` entries and the `pattern` of firewalls, judge the real path, so they do not apply, while the controller of the route runs.\n\nWith the route `/admin/report/{id}`, the host `app.{domain}` and `access_control: [{ path: ^/admin, roles: ROLE_ADMIN }]`, an anonymous request for `/admin/report/1` is sent to the login page, while one with the host `app` and the path `/x./admin/report/1` reaches the controller, with `domain=\"/x\"`. With the requirement `domain: .+`, the real host name works: `app.example.com` and `/x./admin/report/1` match with `domain=\"example.com./x\"`.\n\nApplications are affected when they have routes with host placeholders protected by path-based rules. With the default requirement, the `Host` must be the host of the route without its last labels, such as `app`: `framework.trusted_hosts` blocks that, while a web server that only serves known names may not, for instance nginx passing the raw `Host` header to FastCGI for a request line that carries an absolute URI. With a requirement that accepts `/`, such as `.+`, the real host name works and `trusted_hosts` does not help.\n\n### Resolution\n\nThe compiled regexp now captures the path ahead of each host alternative that has placeholders, and checks after the host regexp that the rest of the subject is that path. Since a host cannot contain `/`, the path starts at the first `/`, and host placeholders can no longer match any part of it, whatever their requirements. Valid requests keep the same route and the same parameters, as verified against `UrlMatcher` over eleven million generated cases.\n\nThe fix is in the dumper, so an application keeps its vulnerable compiled routes until its cache is cleared. Clear the cache after upgrading.\n\nThe patches for this issue are available [here](https://github.com/symfony/symfony/commit/067cde51e29f6d605de4de53322a02c6e23b5416) for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).\n\n### Credits\n\nSymfony would like to thank Vincent Cassiau (CyberVanguard) for reporting the issue and Nicolas Grekas for providing the fix.\n\nSymfony would also like to thank [Bruno Dias](https://github.com/cx-bruno-dias) and [Ana Lisboa](https://github.com/cx-ana-lisboa) from Checkmarx for their help getting a CVE assigned.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.4.56"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.23"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/routing"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.1.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.4.56"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.23"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.1.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-xqw3-x93m-887x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-118516"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/067cde51e29f6d605de4de53322a02c6e23b5416"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/routing/CVE-2026-118516.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-118516.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/releases/tag/v5.4.56"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/releases/tag/v6.4.50"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/releases/tag/v7.4.23"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/releases/tag/v8.1.11"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2026-118516"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-436", "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T21:13:26Z",
"nvd_published_at" : "2026-11-04T13:17:26Z"
}
}