{"id":"CVE-2025-29771","published":"2025-03-14T18:56:24Z","modified":"2025-03-18T14:26:06Z","title":"HtmlSanitizer vulnerable to XSS when used with contentEditable","vendor":"jitbit","product":"HtmlSanitizer","tier":"tail","description":{"text":"HtmlSanitizer is a client-side HTML Sanitizer. Versions prior to 2.0.3 have a cross-site scripting vulnerability when the sanitizer is used with a `contentEditable` element to set the elements `innerHTML` to a sanitized string produced by the package. If the code is particularly crafted to abuse the code beautifier, that runs AFTER sanitation. The issue is patched in version 2.0.3.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00404,"percentile":0.35509,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/jitbit/HtmlSanitizer/security/advisories/GHSA-vhv4-fh94-jm5x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jitbit/HtmlSanitizer/commit/af6d2a78877e7277cd01c825b7fb50edb5956963","tags":["x_refsource_MISC"]}],"priority":{"score":10.8,"factors":[{"name":"EPSS percentile","points":7.1},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"jitbit","affectedVersions":[{"vendor":"jitbit","product":"HtmlSanitizer","versions":["< 2.0.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-18T14:25:51.723087Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@jitbit/htmlsanitizer","vulnerableRanges":["<2.0.3"],"patched":["2.0.3"],"from":["GHSA-vhv4-fh94-jm5x"],"provenance":"source"}],"summary":{"text":"The HtmlSanitizer client-side library, prior to version 2.0.3, contains a cross-site scripting flaw when its sanitized output is assigned to the innerHTML of a contentEditable element, because a code beautifier that runs after sanitization can be abused by specially crafted input. An attacker over the network with no privileges can trigger this by getting a user to interact with the affected page, which is a user-interaction condition, and the flaw is fixed in version 2.0.3.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:01:30Z"},"euvd":{"id":"EUVD-2025-7889","exploited":false,"provenance":"source"}}