Skip to main content
← Vulnerabilities

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.

6.3MediumCNA
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.

33Pcve.now Index 33 of 100 · methodology v3 · provisional
  • 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.

Published
Last modified
Published
Not listed in CISA KEV
33/100 · provisional
Fix
Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11
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

  1. CVE published
  2. First seen by cve.now
  3. 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

  1. Advisory
  2. Patch

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

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