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

- Severity: Low 2.3 (CVSS:4.0, scored by Checkmarx) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 19% of CVEs (2026-12-01)
- Published: 2026-11-05T16:26:52.166Z
- Modified: 2026-12-01T21:45:12.756Z
- Also known as: GHSA-c76g-9c4c-gxrw
- Weaknesses: CWE-184, CWE-436
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: Checkmarx

## 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.

(As written by CVE List.)

## Affected

- symfony/http-client: from 6.1.0 before 6.4.50; from 7.0.0 before 7.4.23; from 8.0.0 before 8.1.11
- symfony/html-sanitizer (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
- symfony/symfony (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

## Every score

- Checkmarx: CVSS:4.0 2.3 Low `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`
- CISA-ADP: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 4.3 Low `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- GitHub: CVSS:4.0 Low `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`

## References

- <https://github.com/symfony/symfony/security/advisories/GHSA-c76g-9c4c-gxrw> (third-party-advisory, web)
- <https://github.com/symfony/symfony/commit/f2f47d2eef6c2552c6c5c24953caa94f7901cb43> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-118517> (advisory)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-118517.yaml> (web)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-118517.yaml> (web)
- <https://github.com/symfony/symfony> (package)
- <https://github.com/symfony/symfony/releases/tag/v6.4.50> (web)
- <https://github.com/symfony/symfony/releases/tag/v7.4.23> (web)
- <https://github.com/symfony/symfony/releases/tag/v8.1.11> (web)
- <https://symfony.com/cve-2026-118517> (web)

## Sources

- CVE List: [CVE-2026-118517](https://www.cve.org/CVERecord?id=CVE-2026-118517), CVE Terms of Use, modified 2026-11-05
- GitHub Advisory Database: [GHSA-c76g-9c4c-gxrw](https://github.com/advisories/GHSA-c76g-9c4c-gxrw), CC-BY-4.0, modified 2026-12-01
- NVD: [CVE-2026-118517](https://nvd.nist.gov/vuln/detail/CVE-2026-118517), Public domain, modified 2026-11-06

---

Page: https://cve.day/CVE-2026-118517 · Whole record: https://cve.day/CVE-2026-118517.json · Rebuilt by cve.day 2026-12-01T21:57:10.430Z
