# CVE-2025-29771: HtmlSanitizer vulnerable to XSS when used with contentEditable

- Severity: Medium 5.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 36% of CVEs (2026-12-01)
- Published: 2025-03-14T18:56:24.504Z
- Modified: 2026-06-17T09:05:38.583Z
- Also known as: GHSA-vhv4-fh94-jm5x
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- jitbit HtmlSanitizer: < 2.0.3
- @jitbit/htmlsanitizer (npm): before 2.0.3

## Every score

- GitHub_M: CVSS:4.0 5.3 Medium `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`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`

## References

- <https://github.com/jitbit/HtmlSanitizer/security/advisories/GHSA-vhv4-fh94-jm5x> (web)
- <https://github.com/jitbit/HtmlSanitizer/commit/af6d2a78877e7277cd01c825b7fb50edb5956963> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-29771> (advisory)
- <https://github.com/jitbit/HtmlSanitizer> (package)

## Sources

- CVE List: [CVE-2025-29771](https://www.cve.org/CVERecord?id=CVE-2025-29771), CVE Terms of Use, modified 2025-03-18
- GitHub Advisory Database: [GHSA-vhv4-fh94-jm5x](https://github.com/advisories/GHSA-vhv4-fh94-jm5x), CC-BY-4.0, modified 2025-03-14
- NVD: [CVE-2025-29771](https://nvd.nist.gov/vuln/detail/CVE-2025-29771), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-29771 · Whole record: https://cve.day/CVE-2025-29771.json · Rebuilt by cve.day 2026-11-25T22:58:55.270Z
