{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-121949","assignerOrgId":"596c5446-0ce5-4ba2-aa66-48b3b757a647","state":"PUBLISHED","assignerShortName":"Checkmarx","dateReserved":"2026-11-04T12:43:13.943Z","datePublished":"2026-11-05T17:46:04.672Z","dateUpdated":"2026-11-05T19:59:59.269Z"},"containers":{"cna":{"providerMetadata":{"orgId":"596c5446-0ce5-4ba2-aa66-48b3b757a647","shortName":"Checkmarx","dateUpdated":"2026-11-05T17:46:04.672Z"},"title":"Symfony: HtmlSanitizer Does Not URL-Sanitize srcset and imagesrcset: Media Scheme and Host Allow-List Bypass","datePublic":"2026-11-05T17:45:00.000Z","problemTypes":[{"descriptions":[{"lang":"en","cweId":"CWE-184","description":"CWE-184 Incomplete list of disallowed inputs","type":"CWE"}]},{"descriptions":[{"lang":"en","cweId":"CWE-1023","description":"CWE-1023 Incomplete Comparison with Missing Factors","type":"CWE"}]}],"affected":[{"vendor":"sensiolabs","product":"symfony","collectionURL":"https://packagist.org/packages/symfony/html-sanitizer","packageName":"symfony/html-sanitizer","repo":"https://github.com/symfony/html-sanitizer","modules":["Symfony\\Component\\HtmlSanitizer"],"versions":[{"status":"affected","version":"6.1.0","lessThan":"6.4.50","versionType":"git"},{"status":"affected","version":"7.0.0","lessThan":"7.4.23","versionType":"git"},{"status":"affected","version":"8.0.0","lessThan":"8.1.11","versionType":"git"}],"defaultStatus":"unaffected"}],"cpeApplicability":[{"operator":"OR","nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.0","versionEndExcluding":"6.4.50"},{"vulnerable":true,"criteria":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0.0","versionEndExcluding":"7.4.23"},{"vulnerable":true,"criteria":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","versionStartIncluding":"8.0.0","versionEndExcluding":"8.1.11"}]}]}],"descriptions":[{"lang":"en","value":"The Symfony HtmlSanitizer component does not apply the media URL policy to the srcset and imagesrcset attributes, allowing values that point to hosts or schemes not permitted by allowMediaSchemes() or allowMediaHosts() to bypass it, so that browsers load images from disallowed hosts 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.The srcset attribute on img and source elements and the imagesrcset attribute on link elements are allowed by the sanitizer, but their URL candidates are never validated, so their values are kept verbatim while the same URL in src is dropped. The fixes for CVE-2026-45753 and CVE-2026-48761 extended the same attribute list but did not cover these two attributes. For example, with allowMediaSchemes(['https']) and allowMediaHosts(['trusted.example']), <img srcset=\"https://evil.example/a.png 1x\"> survives sanitization, and the browser fetches the selected candidate as it would fetch src. Candidates with a scheme forbidden by the configuration, such as http, are kept as well.\nAny application that sanitizes untrusted HTML and relies on the media schemes and hosts allowlists to restrict where images can be loaded from is affected. A single crafted value is enough to make the browser of a user viewing the sanitized content send a request to an attacker-controlled host, which can be used to track viewers or log their IP addresses. No authentication is needed if the application accepts HTML from unauthenticated users.","supportingMedia":[{"type":"text/html","base64":false,"value":"The Symfony HtmlSanitizer component does not apply the media URL policy to the&nbsp;<code>srcset</code>&nbsp;and&nbsp;<code>imagesrcset</code>&nbsp;attributes, allowing values that point to hosts or schemes not permitted by&nbsp;<code>allowMediaSchemes()</code>&nbsp;or&nbsp;<code>allowMediaHosts()</code>&nbsp;to bypass it, so that browsers load images from disallowed hosts 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.<div>The&nbsp;<code>srcset</code>&nbsp;attribute on&nbsp;<code>img</code>&nbsp;and&nbsp;<code>source</code>&nbsp;elements and the&nbsp;<code>imagesrcset</code>&nbsp;attribute on&nbsp;<code>link</code>&nbsp;elements are allowed by the sanitizer, but their URL candidates are never validated, so their values are kept verbatim while the same URL in&nbsp;<code>src</code>&nbsp;is dropped. The fixes for CVE-2026-45753 and CVE-2026-48761 extended the same attribute list but did not cover these two attributes. For example, with&nbsp;<code>allowMediaSchemes(['https'])</code> and <code>allowMediaHosts(['trusted.example'])</code>, <code>&lt;img srcset=\"https://evil.example/a.png 1x\"&gt;</code> survives sanitization, and the browser fetches the selected candidate as it would fetch <code>src</code>. Candidates with a scheme forbidden by the configuration, such as <code>http</code>, are kept as well.<br>Any application that sanitizes untrusted HTML and relies on the media schemes and hosts allowlists to restrict where images can be loaded from is affected. A single crafted value is enough to make the browser of a user viewing the sanitized content send a request to an attacker-controlled host, which can be used to track viewers or log their IP addresses.&nbsp;No authentication is needed if the application accepts HTML from unauthenticated users.</div>"}]}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-q8jq-xrf4-v5j8","tags":["third-party-advisory"]},{"url":"https://github.com/symfony/symfony/commit/50e7a38a8f088601c09669b9d267c9c0228884e1","tags":["patch"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"NONE","subConfidentialityImpact":"LOW","vulnIntegrityImpact":"NONE","subIntegrityImpact":"LOW","vulnAvailabilityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"LOW","baseScore":2.3,"vectorString":"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"}}],"credits":[{"lang":"en","value":"Shriyansh Gupta","type":"reporter"},{"lang":"en","value":"Ilia Alshanetsky","type":"reporter"},{"lang":"en","value":"李智遥","type":"reporter"},{"lang":"en","value":"Nicolas Grekas","type":"remediation developer"}],"source":{"advisory":"GHSA-q8jq-xrf4-v5j8","discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 1.0.5"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.4,"attackVector":"NETWORK","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","integrityImpact":"LOW","userInteraction":"REQUIRED","attackComplexity":"LOW","availabilityImpact":"NONE","privilegesRequired":"NONE","confidentialityImpact":"LOW"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-11-05T19:59:10.426339Z","id":"CVE-2026-121949","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2026-11-05T19:59:59.269Z"}}]}}