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.
Advisories
Source ID Title
EUVD EUVD EUVD-2025-7889 JS Html Sanitizer allows XSS when used with contentEditable
Github GHSA Github GHSA GHSA-vhv4-fh94-jm5x JS Html Sanitizer allows XSS when used with contentEditable
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Mon, 14 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00068}

epss

{'score': 0.00094}


Tue, 18 Mar 2025 15:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 14 Mar 2025 19:15:00 +0000

Type Values Removed Values Added
Metrics cvssV4_0

{'score': 1.3, '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/E:U'}

cvssV4_0

{'score': 5.3, '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'}


Fri, 14 Mar 2025 19:00:00 +0000

Type Values Removed Values Added
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.
Title HtmlSanitizer vulnerable to XSS when used with contentEditable
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 1.3, '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/E:U'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2025-03-18T14:26:06.976Z

Reserved: 2025-03-11T14:23:00.474Z

Link: CVE-2025-29771

cve-icon Vulnrichment

Updated: 2025-03-18T14:25:29.356Z

cve-icon NVD

Status : Received

Published: 2025-03-14T19:15:48.847

Modified: 2025-03-14T19:15:48.847

Link: CVE-2025-29771

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses