CVE-2025-29771
JavaScript vulnerability analysis and mitigation

Overview

HtmlSanitizer, a client-side HTML Sanitizer, was found to contain a cross-site scripting (XSS) vulnerability in versions prior to 2.0.3. The vulnerability was discovered on March 14, 2025, and affects scenarios where the sanitizer is used with a contentEditable element to set the elements innerHTML to a sanitized string produced by the package (NVD, GitHub Advisory).

Technical details

The vulnerability stems from the code beautifier that runs after the sanitization process. When specifically crafted code is used to abuse the beautifier functionality, it can bypass the intended sanitization protections. The issue has been assigned a CVSS 4.0 Base Score of 5.3 (Medium) with the vector string 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 and is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) (NVD).

Impact

The vulnerability could allow attackers to execute cross-site scripting attacks when the sanitizer is used in conjunction with contentEditable elements. This could potentially lead to unauthorized script execution in the context of the affected web application (GitHub Advisory).

Exploitability

The vulnerability requires user interaction and can be exploited remotely. The attack vector involves crafting specific code that can abuse the beautifier functionality which runs after the sanitization process (NVD).

Mitigation and workarounds

The vulnerability has been patched in HtmlSanitizer version 2.0.3. Users are advised to upgrade to this version or later to address the security issue. The fix involved removing the beautification process that was introducing the attack vector (GitHub Commit).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-55157HIGH8.4
  • JavaScript logoJavaScript
  • @ooples/token-optimizer-mcp
NoYesAug 14, 2026
CVE-2026-35219HIGH7.1
  • JavaScript logoJavaScript
  • @budibase/server
NoYesAug 14, 2026
CVE-2026-55156MEDIUM5.3
  • JavaScript logoJavaScript
  • @ooples/token-optimizer-mcp
NoYesAug 14, 2026
CVE-2026-50029MEDIUM5.3
  • JavaScript logoJavaScript
  • js-toml
NoYesAug 14, 2026
CVE-2026-73428MEDIUM4.6
  • JavaScript logoJavaScript
  • trix
NoYesAug 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management