{"id":"CVE-2026-118517","kind":"vulnerability","aliases":["CVE-2026-118517"],"related":[],"title":"Symfony HtmlSanitizer: host allow-lists can be bypassed via malformed URLs","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.\n\n\n\nUrlSanitizer 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.\n\n\n\nThis is exploitable when a host allow-list is combined with allowRelativeLinks(true) or allowRelativeMedias(true). The default configuration is not affected.","summary":"The Symfony HtmlSanitizer UrlSanitizer parses some malformed URLs differently from browsers, so allowLinkHosts() and allowMediaHosts() checks are skipped for them. Untrusted hosts can end up referenced in sanitized HTML output.","severity":"medium","cvss":4.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["html-sanitizer","package","php","symfony"],"not_affected_if":["default-config","no-host-allow-list","relative-links-disabled"],"how_to_check":"- Run `composer show symfony/html-sanitizer` to see the installed version.\n- Search the code for `allowLinkHosts(` or `allowMediaHosts(` together with `allowRelativeLinks(true)` or `allowRelativeMedias(true)`.","fix":"- Symfony `6.4.50`, `7.4.23`, and `8.1.11` (and later in each line); 6.1.x is affected before 6.4.50, so move to the 6.4 line.","status":"open","published_at":"2026-11-05T17:17:53+00:00","first_seen_at":"2026-11-05T17:40:03+00:00","triaged_at":"2026-11-05T17:42:38+00:00","updated_at":"2026-11-05T17:42:38+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-05T17:42:38Z","model":"claude-haiku-5-5","output":{"fix":"- Symfony `6.4.50`, `7.4.23`, and `8.1.11` (and later in each line); 6.1.x is affected before 6.4.50, so move to the 6.4 line.","reach":"internet","title":"Symfony HtmlSanitizer: host allow-lists can be bypassed via malformed URLs","impact":"low","summary":"The Symfony HtmlSanitizer UrlSanitizer parses some malformed URLs differently from browsers, so allowLinkHosts() and allowMediaHosts() checks are skipped for them. Untrusted hosts can end up referenced in sanitized HTML output.","audience":"developers","category":"package","nicknames":[],"who_cares":["symfony","php","html-sanitizer"],"confidence":0.8,"fix_status":"available","needs_auth":"unknown","worst_case":"Untrusted external hosts appear in sanitized links or media.","analyst_note":"","how_to_check":"- Run `composer show symfony/html-sanitizer` to see the installed version.\n- Search the code for `allowLinkHosts(` or `allowMediaHosts(` together with `allowRelativeLinks(true)` or `allowRelativeMedias(true)`.","plain_action":"","needs_analyst":false,"not_affected_if":["default-config","no-host-allow-list","relative-links-disabled"],"who_is_affected":"Applications that use the Symfony HtmlSanitizer with a host allow-list (allowLinkHosts or allowMediaHosts) and also allow relative links or media. The default configuration is not affected, so applications that do not set a host allow-list can skip it.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000751,"input_tokens":4522,"output_tokens":598,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-118517':15A,18A '-2026':14A,17A,157C '-45066':158C '/evil.example':138C,140C '0':168C '3986':118C '6.1':94C '6.4.50':98C '7':99C '7.4.23':103C '8':105C '8.1.11':109C 'add':154C 'affect':200C 'allow':5A,65C,185C 'allow-list':4A,184C 'allowlinkhost':37B,67C 'allowmediahost':39B,69C 'allowrelativelink':190C 'allowrelativemedia':193C 'also':170C 'author':81C,133C 'browser':35B,64C,120C,147C 'bypass':9A,73C 'check':40B,70C 'combin':188C 'compon':58C 'configur':197C 'cve':13A,16A,156C 'default':196C 'differ':33B,62C 'end':48B 'evil.example':137C,151C 'exploit':180C 'falsi':177C 'find':143C 'follow':116C,121C 'form':80C,132C,164C 'guard':153C 'host':3A,46B,85C,145C,167C,183C 'html':20B,53B 'html-sanit':19B 'htmlsanit':2A,27B,57C 'http':136C 'league/uri':114C 'list':6A,186C 'malform':11A,31B 'miss':159C 'output':54B,90C 'packag':22B 'pars':29B,60C,111C 'php':23B,173C 'prior':96C,101C,107C 'referenc':50B,87C 'resolv':148C 'result':82C 'rfc':117C 'sanit':21B,52B,89C,142C 'skip':42B,171C 'slash':163C 'standard':125C 'symfoni':1A,24B,26B,56C,92C 'treat':174C 'true':191C,194C 'untrust':45B,84C 'url':12A,32B,61C,75C,112C,124C,127C 'urlsanit':28B,59C,110C 'version':93C 'via':10A 'well':79C,131C 'well-form':78C,130C 'whatwg':123C 'wherea':146C 'without':76C,128C 'x':95C,100C,106C 'zero':162C 'zero-slash':161C","nicknames":[],"mitigations":[],"who_affected":"Applications that use the Symfony HtmlSanitizer with a host allow-list (allowLinkHosts or allowMediaHosts) and also allow relative links or media. The default configuration is not affected, so applications that do not set a host allow-list can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["htmlsanitizer","medium","package","php","symfony"],"campaign_type":null,"first_public_at":"2026-11-04T11:43:55+00:00","kev":null,"cvss_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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"596c5446-0ce5-4ba2-aa66-48b3b757a647","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118517","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118517","severity":null,"published_at":"2026-11-05T17:17:53+00:00","modified_at":"2026-11-05T17:17:53+00:00","first_seen_at":"2026-11-05T17:40:03+00:00","fetched_at":"2026-11-05T17:40:03+00:00","note":null}],"documents":[{"id":78085,"url":"https://github.com/symfony/symfony/commit/f2f47d2eef6c2552c6c5c24953caa94f7901cb43","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":78086,"url":"https://github.com/symfony/symfony/security/advisories/GHSA-c76g-9c4c-gxrw","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-04T11:43:55+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}