OWASP java-html-sanitizer
OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization
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.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- = 20240325.1
- >= 20240325.1, < 20260101.1
Fixed in 20260101.1
from GitHub Security Advisory GHSA-g9gq-3pfx-2gw2
Mitigation
Upgrade com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer to 20260101.1 or later.
References
- Vendor advisory github.com/OWASP/java-html-sanitizer/security/…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.