OWASP Java HTML Sanitizer is a configureable HTML Sanitizer written in Java, allowing inclusion of HTML authored by third-parties in web applications while protecting against XSS. In version 20240325.1, OWASP java html sanitizer is vulnerable to XSS if HtmlPolicyBuilder allows noscript and style tags with allowTextIn inside the style tag. This could lead to XSS if the payload is crafted in such a way that it does not sanitise the CSS and allows tags which is not mentioned in HTML policy. At time of publication no known patch is available.
Advisories
Source ID Title
Github GHSA Github GHSA GHSA-g9gq-3pfx-2gw2 OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Wed, 26 Nov 2025 02:00:00 +0000

Type Values Removed Values Added
Description OWASP Java HTML Sanitizer is a configureable HTML Sanitizer written in Java, allowing inclusion of HTML authored by third-parties in web applications while protecting against XSS. In version 20240325.1, OWASP java html sanitizer is vulnerable to XSS if HtmlPolicyBuilder allows noscript and style tags with allowTextIn inside the style tag. This could lead to XSS if the payload is crafted in such a way that it does not sanitise the CSS and allows tags which is not mentioned in HTML policy. At time of publication no known patch is available.
Title OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2025-11-26T01:53:37.578Z

Reserved: 2025-11-21T01:08:02.613Z

Link: CVE-2025-66021

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2025-11-26T02:15:49.723

Modified: 2025-11-26T02:15:49.723

Link: CVE-2025-66021

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.