CVE-2025-66021
Java vulnerability analysis and mitigation

Overview

OWASP Java HTML Sanitizer version 20240325.1 contains a Cross-Site Scripting (XSS) vulnerability that was discovered and disclosed on November 25, 2025. The vulnerability affects the HTML sanitization process when the HtmlPolicyBuilder allows noscript and style tags with allowTextIn functionality inside the style tag (GitHub Advisory).

Technical details

The vulnerability occurs specifically when HtmlPolicyBuilder allows both noscript and style tags with allowTextIn inside style tags. The issue arises from how the browser perceives noscript tags post-sanitization. When a payload combines noscript tag with style tag, the browser processes the noscript wrapper around the style tag differently, allowing script payload to be executed as valid HTML. The vulnerability has been assigned a CVSS 4.0 base score of 8.6 (High) with the vector string 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 (GitHub Advisory).

Impact

The vulnerability can lead to Cross-Site Scripting (XSS) attacks in applications using the affected version of the OWASP Java HTML Sanitizer. This allows attackers to execute arbitrary web scripts or HTML in the context of other users' browsers, potentially leading to theft of sensitive information, session hijacking, or other malicious actions (GitHub Advisory).

Mitigation and workarounds

At the time of publication, no known patch is available for this vulnerability. Users should avoid configuring HtmlPolicyBuilder to allow both noscript and style tags with allowTextIn functionality inside style tags (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66021HIGH8.6
  • JavaJava
  • com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer
NoNoNov 26, 2025
CVE-2025-58360HIGH8.2
  • JavaJava
  • org.geoserver.web:gs-web-app
NoYesNov 25, 2025
CVE-2025-65998HIGH7.5
  • JavaJava
  • org.apache.syncope:syncope-core
NoYesNov 24, 2025
CVE-2025-13435MEDIUM6.3
  • JavaJava
  • cn.dreampie:resty
NoNoNov 20, 2025
CVE-2025-21621MEDIUM6.1
  • JavaJava
  • org.geoserver.web:gs-web-app
NoYesNov 25, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management