Symfony HtmlSanitizer Component URL Parsing Vulnerability
CVE-2026-118517

2.3LOW

Key Information:

Vendor

Sensiolabs

Status
Vendor
CVE Published:
5 November 2026

What is CVE-2026-118517?

The UrlSanitizer in Symfony's HtmlSanitizer component processes URLs differently than major web browsers, which leads to potential security issues. Specifically, it allows the bypassing of allowLinkHosts() and allowMediaHosts() checks for URLs lacking a well-formed authority. For instance, malformed URLs like 'http:evil.example' or 'https://://evil.example/' might not be recognized as having a host by the sanitizer, unlike browsers that resolve them correctly. As a result, untrusted hosts can be referenced in sanitized outputs when combined with allowRelativeLinks(true) or allowRelativeMedias(true). While the default configuration remains secure, awareness of this vulnerability is crucial for developers using affected Symfony versions.

Affected Version(s)

symfony 6.1.0 < 6.4.50

symfony 7.0.0 < 7.4.23

symfony 8.0.0 < 8.1.11

References

CVSS V4

Score:
2.3
Severity:
LOW
Confidentiality:
None
Integrity:
Low
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
Unknown

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Nicolas Grekas
Ilia Alshanetsky
.