Skip to main content
← Vulnerabilities

Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URLs Without a Well-Formed Authority (Incomplete Fix for…

2.3LowCNA
Exploited
Proof of concept public, per CISA
Fix
Fixed in 6.4.50, 7.4.23, 8.1.11
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 6.4.50, 7.4.23, 8.1.11.

Published
Last modified
34/100 · provisional
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

The Symfony HtmlSanitizer component lets a remote attacker, without logging in, get untrusted hosts referenced in sanitized output by using malformed URLs that bypass the allowLinkHosts() and allowMediaHosts() checks, though a user must take an action for this to happen. It is exploitable only when a host allow-list is combined with allowRelativeLinks(true) or allowRelativeMedias(true), since the default configuration is not affected.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

Read the original description

The Symfony HtmlSanitizer component UrlSanitizer parses URLs differently from browsers, allowing the allowLinkHosts() and allowMediaHosts() checks to be bypassed for URLs without a well-formed authority, resulting in untrusted hosts being referenced in sanitized output in Symfony versions 6.1.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11.

UrlSanitizer parses URLs with league/uri, which follows RFC 3986, while browsers follow the WHATWG URL standard. For URLs without a well-formed authority, such as http:evil.example, ///evil.example, or https://://evil.example/ the sanitizer finds no host, whereas browsers resolve them to evil.example. The guard added for CVE-2026-45066 missed the zero-slash form, and the host 0 was also skipped because PHP treats it as falsy.

This is exploitable when a host allow-list is combined with allowRelativeLinks(true) or allowRelativeMedias(true). The default configuration is not affected.

cve.now Index

34Pcve.now Index 34 of 100 · methodology v3 · provisional
  • Exploitation15/40CISA rates a proof of concept as public
  • Exposure7/25Reachable over the network without a login · Unknown: No advisory context yet
  • Reach10/20Affects Packagist packages
  • Severity2.3/10CVSS 2.3
  • No patch0/5No signal

What would change the score

  • Would score about 74 if added to CISA KEV
  • Would score about 69 if CISA's SSVC rates exploitation active
  • Would score about 49 if advisories confirm default setups are exposed

What to do

  • Upgrade to a fixed version: 6.4.50, 7.4.23, 8.1.11.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  4. Record last updated

Affected versions

  • symfony/http-clientPackagist

    From 6.1.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.

Questions about CVE-2026-118517

Is CVE-2026-118517 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. CISA's SSVC assessment notes a proof of concept exists. No public exploit code is tracked.Source: cve.now feed data

Which versions are affected by CVE-2026-118517?

symfony/http-client (Packagist): from 6.1.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-118517?

Upgrade to a fixed version: 6.4.50, 7.4.23, 8.1.11.Source: cve.now feed data