NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
MEDIUM severity

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

MEDIUMFix: symfony/symfony@f2f47d2

GHSA-c76g-9c4c-gxrw is a medium-severity (CVSS 4.3) CWE-184 vulnerability in symfony/html-sanitizer. A fix is available for symfony/html-sanitizer — see the affected versions and patch details below.

Also known asCVE-2026-118517
Published
Updated
Affected
6 pkgs
Patched
6 / 6
Exploits
None indexed
Exploitation data as of Dec 1, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for GHSA-c76g-9c4c-gxrw.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs19th percentile — riskier than 19% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

6 pkgs affected
🐘symfony/html-sanitizer🐘symfony/html-sanitizer🐘symfony/html-sanitizer🐘symfony/symfony🐘symfony/symfony🐘symfony/symfony

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Description

UrlSanitizer parses URLs with league/uri, which follows RFC 3986. For a special scheme written with no authority slashes, such as http:evil.example, RFC 3986 yields scheme http, host null and path evil.example. The sanitizer then skips the host allow-list check because the host is null, and with allowRelativeLinks(true) it also waives the rejection of hostless URLs, so the URL is kept. Browsers parse the same string per the WHATWG URL standard. There, // is optional when the scheme differs from the scheme of the page. The authority is then evil.example, and navigation goes to http://evil.example/. With the scheme of the page, as https:evil.example on an https page, browsers read a relative path instead. So on an https site, the attacker uses http:.

The guard added for CVE-2026-45066 rejects the one-slash and three-slash spellings but not the zero-slash form:

~^(?:https?|ftp|wss?):(/[^/]|///)~i

Proof of concept, with a configuration that allows one host plus relative links, a natural content-management setup:

$c = (new HtmlSanitizerConfig())->allowSafeElements()
    ->allowLinkHosts(['trusted.example'])->allowRelativeLinks(true);

(new HtmlSanitizer($c))->sanitize('<a href="https://evil.example/">x</a>');    // <a>x</a>, correct
(new HtmlSanitizer($c))->sanitize('<a href="http:evil.example/login">x</a>');  // unchanged, bypass

Two more spellings of the same disagreement were found while fixing. A scheme-relative URL with three or more slashes, ///evil.example, is a path for RFC 3986 and the authority evil.example for browsers. An empty authority, https://://evil.example/, is an empty host followed by the path //evil.example/ for RFC 3986, so the host allow-list was skipped, and rebuilding the URL produced https:////evil.example/, which browsers read as the authority evil.example. The media policy is affected the same way under allowRelativeMedias(true).

Every form disappears with allowRelativeLinks(false), so the default configuration is not affected. The severity is rated low on that basis: the bypass requires the opt-in combination of a host allow-list and relative URLs.

Resolution

The guard now requires the special schemes http, https, ftp, ws and wss to be followed by exactly //, which closes the zero-, one- and three-slash spellings in a single check, and rejects scheme-relative URLs that start with three or more slashes. After parsing, a URL whose authority is present but empty is rejected as well.

One behaviour change is worth noting for reviewers: a bare https://, and any URL with an empty authority, is now dropped where it previously round-tripped under allowRelativeLinks(true).

The host allow-list is now also applied to the host 0, which the sanitizer treated as a missing host (PHP considers the string falsy) while browsers resolve it to 0.0.0.0: under allowRelativeLinks(true) such a URL was kept without being checked against the allowed hosts.

The patches for this issue are available here for branch 6.4 (and forward-ported to 7.4, 8.1 and 8.2).

Credits

Symfony would like to thank Ilia Alshanetsky for reporting the issue.

Symfony would also like to thank Bruno Dias and Catarina Amorim from Checkmarx for their help getting a CVE assigned.

Affected Packages

6 total 6 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistsymfony/html-sanitizer≥ 6.1.0&&< 6.4.506.4.50composer require symfony/html-sanitizer:^6.4.50
🐘Packagistsymfony/html-sanitizer≥ 7.0.0&&< 7.4.237.4.23composer require symfony/html-sanitizer:^7.4.23
🐘Packagistsymfony/html-sanitizer≥ 8.0.0&&< 8.1.118.1.11composer require symfony/html-sanitizer:^8.1.11
🐘Packagistsymfony/symfony≥ 6.1.0&&< 6.4.506.4.50composer require symfony/symfony:^6.4.50
🐘Packagistsymfony/symfony≥ 7.0.0&&< 7.4.237.4.23composer require symfony/symfony:^7.4.23
🐘Packagistsymfony/symfony≥ 8.0.0&&< 8.1.118.1.11composer require symfony/symfony:^8.1.11

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for symfony/html-sanitizer, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update symfony/html-sanitizer to 6.4.50 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c76g-9c4c-gxrw is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Description `UrlSanitizer` parses URLs with `league/uri`, which follows RFC 3986. For a special scheme written with no authority slashes, such as `http:evil.example`, RFC 3986 yields scheme `http`, host `null` and path `evil.example`. The sanitizer then skips the host allow-list check because the host is null, and with `allowRelativeLinks(true)` it also waives the rejection of hostless URLs, so the URL is kept. Browsers parse the same string per the WHATWG URL standard. There, `//` is optional when the scheme differs from the scheme of the page. The authority is then `evil.example`, and n
O3 Security · Impact-Aware SCA

Is GHSA-c76g-9c4c-gxrw in your dependencies?

Find it across Packagist, including transitive dependencies.

Symfony: HtmlSanitizer allowLinkHosts() /…