{"id":"CVE-2026-41240","published":"2026-04-23T14:54:32Z","modified":"2026-04-23T17:21:30Z","title":"DOMPurify: FORBID_TAGS bypassed by function-based ADD_TAGS predicate (asymmetry with FORBID_ATTR fix)","vendor":"cure53","product":"DOMPurify","tier":"tail","description":{"text":"DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Versions prior to 3.4.0 have an inconsistency between FORBID_TAGS and FORBID_ATTR handling when function-based ADD_TAGS is used. Commit c361baa added an early exit for FORBID_ATTR at line 1214. The same fix was not applied to FORBID_TAGS. At line 1118-1123, when EXTRA_ELEMENT_HANDLING.tagCheck returns true, the short-circuit evaluation skips the FORBID_TAGS check entirely. This allows forbidden elements to survive sanitization with their attributes intact. Version 3.4.0 patches the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":6,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00325,"percentile":0.26231,"provenance":"source"},"cwes":[{"id":"CWE-183","name":"Permissive List of Allowed Inputs"},{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/cure53/DOMPurify/security/advisories/GHSA-h7mw-gpvr-xq4m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/cure53/DOMPurify/commit/c361baa18dbdcb3344a41110f4c48ad85bf48f80","tags":["x_refsource_MISC"]},{"url":"https://github.com/cure53/DOMPurify/releases/tag/3.4.0","tags":["x_refsource_MISC"]}],"priority":{"score":9.4,"factors":[{"name":"EPSS percentile","points":5.25},{"name":"CVSS severity","points":4.2}]},"vendorSlug":"cure53","affectedVersions":[{"vendor":"cure53","product":"DOMPurify","versions":["< 3.4.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-23T17:21:26.630611Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"dompurify","vulnerableRanges":["<3.4.0"],"patched":["3.4.0"],"from":["GHSA-h7mw-gpvr-xq4m"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-25238","exploited":false,"provenance":"source"}}