CVE-2025-29771
MEDIUM 5.3CVSS 4.0JS Html Sanitizer allows XSS when used with contentEditable
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.
- Published
- 14 Mar 2025
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-79
- Also known as
- GHSA-vhv4-fh94-jm5x
- Sources
- NVDJSONOSV GHSA-vhv4-fh94-jm5xJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 5.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | @jitbit/htmlsanitizer | < 2.0.3 | 2.0.3 |
References
- https://github.com/jitbit/HtmlSanitizer/commit/af6d2a78877e7277cd01c825b7fb50edb5956963 · WEB
- https://github.com/jitbit/HtmlSanitizer/security/advisories/GHSA-vhv4-fh94-jm5x · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-29771 · ADVISORY
- https://github.com/jitbit/HtmlSanitizer · PACKAGE
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 14 Mar 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 14 Mar 2025)