CVE-2026-118517

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

Published Nov 5, 2026 CVSS 4.0 · 2.3 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The Symfony HtmlSanitizer component interprets URLs using league/uri following RFC 3986, which differs from the WHATWG URL standard used by browsers. As a result, URLs without a well‑formed authority—such as http:evil.example, ///evil.example, or https://://evil.example/—are parsed without a host by the sanitizer. When a host allow‑list is combined with allowRelativeLinks(true) or allowRelativeMedias(true), this flaw permits untrusted hosts to appear in the sanitized output, potentially enabling injection of malicious content. The CVSS score of 2.3 classifies this vulnerability as low severity, and no arbitrary code execution is possible.

Affected Systems

The issue affects Symfony releases 6.1.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11. The vendor is SensioLabs. The default configuration is not impacted; only setups that explicitly enable allowRelativeLinks or allowRelativeMedias in combination with a host allow‑list are vulnerable.

Risk and Exploitability

The CVSS score of 2.3 classifies this vulnerability as low severity. The EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, indicating a low likelihood of exploitation. Inferred attack scenarios involve an attacker delivering crafted URLs to an application that forwards user input to the HtmlSanitizer with allow‑list logic enabled. Because the flaw does not allow arbitrary code execution, the risk is confined to the inadvertent inclusion of untrusted hosts in the rendered output.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Symfony to a fixed release (≥6.4.50, ≥7.4.23, or ≥8.1.11).
  • If an update is not feasible, disable the allowRelativeLinks or allowRelativeMedias options in the HtmlSanitizer configuration to prevent the bypass.
  • As a temporary precaution, restrict the host allow list to only fully qualified, protocol‑scheme URLs and avoid using relative URLs; validate the host part against a browser‑compatible URL parser before sanitization.

Generated by OpenCVE AI on November 6, 2026 at 14:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N'}

Type Values Removed Values Added
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.
Title Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URLs Without a Well-Formed Authority (Incomplete Fix for CVE-2026-45066)
First Time appeared Sensiolabs
Sensiolabs symfony
Weaknesses CWE-184
CWE-436
CPEs cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*
Vendors & Products Sensiolabs
Sensiolabs symfony
References
Metrics cvssV4_0

{'score': 2.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-1289

    Improper Validation of Unsafe Equivalence in Input

  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-436

    Interpretation Conflict

Sources

Status
PUBLISHED
Assigner
Checkmarx
Published
Updated
Nov 5, 2026, 4:52 PM
Reserved
Oct 28, 2026, 2:33 PM
Status
Awaiting Analysis
Published
Nov 5, 2026, 5:17 PM
Modified
Nov 6, 2026, 9:40 PM
Severity
Moderate
Public date
Nov 5, 2026, 4:26 PM