Symfony: Host Placeholders Can Match the Start of the Path in Compiled URL Matchers, Bypassing Path-Based Access Control
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
- Exploited
- No known exploitation
- Fix
- Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11
- Who is exposed
- Not reported
Do first: Upgrade to a fixed version: 5.4.56, 6.4.50, 7.4.23, 8.1.11.
- Exploitation?/40Exploitation: unknown (data gap). No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed per the CVSS vector, reachable over the network without a login · Data gap: No advisory context yet
- Reach10/20Affects Packagist packages
- Severity6.3/10CVSS 6.3
- No patch0/5No signal
What would change the score
- Would score about 78 if added to CISA KEV
- Would score about 73 if CISA's SSVC rates exploitation active
- Would score about 38 if advisories confirm default setups are exposed
CVE-2026-118516 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 6.3 (medium) and affects symfony; fixed in 5.4.56, 6.4.50, 7.4.23 and 1 more.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- Published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 33/100 · provisional
- Fix
- Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Symfony's routing components can be tricked by crafted Host headers on routes with host placeholders, so path-based access control rules such as access_control or firewall patterns are not applied when the controller runs. A remote attacker without logging in can reach protected controllers this way, but only if the application has routes with host placeholders protected by path-based rules.
Read the original description
The Symfony Routing components CompiledUrlMatcher and UrlMatcher interpret the host and path information differently, allowing path-based authorization rules to be bypassed in Symfony versions prior to 5.4.56, 6.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11. For routes that define a host, CompiledUrlMatcher matches the string $host.'.'.$pathinfo against the host regular expression followed by the path regular expression, while UrlMatcher matches the host and the path separately. A host placeholder can therefore match /, and consume the beginning of the path, so the request is routed to a controller, while UrlMatcher would find no route. Rules that look at the path, such as access_control entries and firewall patterns, are evaluated against the actual request path, so they do not apply while the controller of the route runs, potentially allowing an unauthenticated request to reach a protected controller. For example, with the route /admin/report/{id}, the host app.{domain} and the rule access_control: [{ path: ^/admin, roles: ROLE_ADMIN }], an anonymous request for /admin/report/1 is sent to the login page. A request with the Host header app and path /x./admin/report/1 instead reaches the controller, with domain="/x". With the required domain: .+, the real hostname works: app.example.com and /x./admin/report/1 match with domain="example.com./x". Applications are affected if they have routes with host placeholders protected by path-based rules. With the default requirement, the Host header 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. If the requirement accepts /, such as .+, a real hostname works, and trusted_hosts does not help.
What to do
Upgrade to a fixed version: 5.4.56, 6.4.50, 7.4.23, 8.1.11.
Timeline
- CVE published
- First seen by cve.now
- Record last updated
Affected versions
- symfony/routingPackagist
fixed in 5.4.56; From 6.0.0 · fixed in 6.4.50; From 7.0.0 · fixed in 7.4.23; From 8.0.0 · fixed in 8.1.11
Evidence 2
- Advisory
- Patch
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-118516
Is CVE-2026-118516 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
Which versions are affected by CVE-2026-118516?
symfony/routing (Packagist): before 5.4.56; from 6.0.0 before 6.4.50; from 7.0.0 before 7.4.23; from 8.0.0 before 8.1.11.Source: cve.now feed data
How do I fix CVE-2026-118516?
Upgrade to a fixed version: 5.4.56, 6.4.50, 7.4.23, 8.1.11.Source: cve.now feed data