Skip to main content
CVE-2025-66021VulnerabilityPublished

CVE-2025-66021: OWASP java-html-sanitizer · Cross-site Scripting

Affects OWASP java-html-sanitizerSource CVE Database V5

0

Not known to be exploited · CVSS 8.6 High.

Data as of 26 Oct 2026, 06:26 UTC

CVSS 4.0 base score
8.6High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 18% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 26 Nov 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.

What to do

Affected software

ProductAffectedFixed in
Mavenorg.owasp/java-html-sanitizerpkg:maven/org.owasp/java-html-sanitizerOther threatsAffected
  • =20240325.1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

1. Immediately review and modify HtmlPolicyBuilder configurations to disallow noscript and style tags with allowTextIn inside style tags until a patch is released. 2. Implement additional server-side input validation and output encoding to complement the sanitizer, focusing on CSS content and style-related inputs. 3. Employ Content Security Policy (CSP) headers to restrict script execution and mitigate the impact of potential XSS attacks. 4. Conduct thorough code audits and penetration testing on web applications using this sanitizer version to identify and remediate exploitable injection points. 5. Educate developers and security teams about the vulnerability and safe configuration practices for HTML sanitization. 6. Monitor OWASP and vendor channels for updates or patches and plan prompt deployment once available. 7. Consider alternative sanitization libraries or versions not affected by this vulnerability if immediate mitigation is required. 8. Enhance user awareness to reduce the risk of social engineering attacks that could trigger the vulnerability.

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.

References

Community reviews

Loading reviews…