Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @jitbit/htmlsanitizer
  4. ›
  5. CVE-2025-29771

CVE-2025-29771: JS Html Sanitizer allows XSS when used with contentEditable

March 14, 2025

XSS 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.

References

  • github.com/advisories/GHSA-vhv4-fh94-jm5x
  • github.com/jitbit/HtmlSanitizer
  • github.com/jitbit/HtmlSanitizer/commit/af6d2a78877e7277cd01c825b7fb50edb5956963
  • github.com/jitbit/HtmlSanitizer/security/advisories/GHSA-vhv4-fh94-jm5x
  • nvd.nist.gov/vuln/detail/CVE-2025-29771

Code Behaviors & Features

Detect and mitigate CVE-2025-29771 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.3

Fixed versions

  • 2.0.3

Solution

Upgrade to version 2.0.3 or above.

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/@jitbit/htmlsanitizer/CVE-2025-29771.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:48 +0000.