PT-2025-11301 · Unknown · Sanitize-Html

Published

2025-03-14

·

Updated

2025-03-14

·

CVE-2025-29771

CVSS v4.0

5.3

Medium

VectorAV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Name of the Vulnerable Software and Affected Versions: HtmlSanitizer versions prior to 2.0.3
Description: The issue is a cross-site scripting vulnerability that occurs when HtmlSanitizer is used with a contentEditable element to set the element's innerHTML to a sanitized string produced by the package. If the code is particularly crafted to abuse the code beautifier that runs after sanitation, it can lead to exploitation.
Recommendations: For versions prior to 2.0.3, update to version 2.0.3 to resolve the issue. As a temporary workaround, consider disabling the use of contentEditable elements with HtmlSanitizer until the update is applied. Restrict access to the code beautifier function to minimize the risk of exploitation. Avoid using the innerHTML property to set sanitized strings produced by HtmlSanitizer in contentEditable elements until the issue is resolved.

Exploit

Fix

XSS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2025-29771
GHSA-VHV4-FH94-JM5X

Affected Products

Sanitize-Html