Description
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 6.1.0-BETA1 until 6.4.40, 7.4.12, and 8.0.12, HtmlSanitizer URL sanitization can allow off-allowlist URLs through allowLinkHosts() or allowMediaHosts() because UrlSanitizer::parse() follows RFC 3986 while browsers follow WHATWG URL parsing, and because <area href> is checked against the media policy rather than the link policy. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.
Published: 2026-07-14
Score: 2.3 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Symfony’s HtmlSanitizer component permits URLs that are not on the allowlist when the allowLinkHosts() or allowMediaHosts() methods are used. The flaw stems from a discrepancy between the RFC 3986 parser used by the component’s UrlSanitizer::parse() method and the WHATWG URL algorithm that browsers implement, causing certain URLs to be accepted incorrectly. Additionally, <area href> tags are mistakenly validated against the media policy instead of the link policy, allowing further exploitation. This weakness is a type of parsing error (CWE‑184) and mis‑applied policy (CWE‑436). The impact is that an attacker can inject links or media from arbitrary hosts into sanitized user content, potentially facilitating social engineering or other content‑based attacks, but it does not lead to remote code execution.

Affected Systems

The vulnerability exists in Symfony framework releases from 6.1.0‑BETA1 up to 6.4.39, 7.4.11 and earlier, and 8.0.11 and earlier, and is fixed starting with versions 6.4.40, 7.4.12, and 8.0.12. The affected component is symfony:html-sanitizer and the framework itself. Update to the mentioned releases to remediate.

Risk and Exploitability

The CVSS score for this issue is 2.3 and the EPSS score is less than 1%, indicating a low likelihood of exploitation and the vulnerability is not listed in the CISA KEV catalog. Attackers would need to supply crafted user input that contains suspicious URLs or <area href> tags to be processed by the application's HtmlSanitizer. The likely attack vector is through any feature that accepts user‑generated content (such as comments, email templates, or other HTML input). This inference is based on the described sanitization flow; no elevated privileges or additional conditions are required beyond providing the crafted input.

Generated by OpenCVE AI on August 1, 2026 at 09:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the symfony/html-sanitizer component and the Symfony framework to at least version 6.4.40, 7.4.12, or 8.0.12.
  • If an immediate update is not possible, configure your application to disable or restrict the use of allowLinkHosts() and allowMediaHosts() so that only explicitly approved hosts are permitted.
  • Verify that your custom input handling or validation does not override or bypass HtmlSanitizer checks, and ensure that any <area href> tags are processed using the correct link policy logic.

Generated by OpenCVE AI on August 1, 2026 at 09:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-6312-1 symfony security update
Github GHSA Github GHSA GHSA-qc95-4862-92fh Symfony has an HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URL-Parser Differentials and <area> Misclassification
History

Thu, 16 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 14 Jul 2026 18:15:00 +0000

Type Values Removed Values Added
Description Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 6.1.0-BETA1 until 6.4.40, 7.4.12, and 8.0.12, HtmlSanitizer URL sanitization can allow off-allowlist URLs through allowLinkHosts() or allowMediaHosts() because UrlSanitizer::parse() follows RFC 3986 while browsers follow WHATWG URL parsing, and because <area href> is checked against the media policy rather than the link policy. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.
Title Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URL-Parser Differentials and <area> Misclassification
Weaknesses CWE-184
CWE-436
References
Metrics cvssV4_0

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


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-16T14:29:30.033Z

Reserved: 2026-05-08T18:45:10.096Z

Link: CVE-2026-45066

cve-icon Vulnrichment

Updated: 2026-07-16T14:29:23.755Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T09:30:03Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-436

    Interpretation Conflict