{"id":"CVE-2025-29771","summary":"HtmlSanitizer vulnerable to XSS when used with contentEditable","details":"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.","aliases":["GHSA-vhv4-fh94-jm5x"],"modified":"2026-03-20T12:41:57.030392Z","published":"2025-03-14T18:56:24.504Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/29xxx/CVE-2025-29771.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/29xxx/CVE-2025-29771.json"},{"type":"ADVISORY","url":"https://github.com/jitbit/HtmlSanitizer/security/advisories/GHSA-vhv4-fh94-jm5x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-29771"},{"type":"FIX","url":"https://github.com/jitbit/HtmlSanitizer/commit/af6d2a78877e7277cd01c825b7fb50edb5956963"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/jitbit/htmlsanitizer","events":[{"introduced":"0"},{"fixed":"67d23a1bd2f8a2dd66939449a89f307b2f0acac1"}]}],"versions":["1.0.0","1.0.1","2.0.0","2.0.1","2.0.2"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-29771.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}