CVE-2025-66021
HIGH 8.6CVSS 4.0OWASP 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. Prior to 20260101.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. This vulnerability is fixed in 20260101.1.
- Published
- 26 Nov 2025
- Last modified
- 3 Dec 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-g9gq-3pfx-2gw2
- Sources
- NVDJSONCVE ListJSONOSV GHSA-g9gq-3pfx-2gw2JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 8.6 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| CVE List | GitHub_M | CVSS 4.0 | HIGH 8.6 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| CVE List | CISA-ADP | SSVC | Exploitation: poc; Automatable: no; Technical Impact: total |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | owasp | java_html_sanitizercpe:2.3:a:owasp:java_html_sanitizer:20240325.1:*:*:*:*:*:*:* |
= 20240325.1 | |
| CVE List | OWASP | java-html-sanitizer | = < 20260101.1 | |
| OSV | Maven | com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer | < 20260101.1 | 20260101.1 |
References
- https://github.com/OWASP/java-html-sanitizer/security/advisories/GHSA-g9gq-3pfx-2gw2 · Exploit, Vendor Advisory, x_refsource_CONFIRM, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-66021 · ADVISORY
- https://github.com/OWASP/java-html-sanitizer/issues/363 · WEB
- https://github.com/OWASP/java-html-sanitizer/commit/4149cf02ba84db13e8e9d7ee1b01b3f47238e072 · WEB
- https://github.com/OWASP/java-html-sanitizer/commit/b98cdf1cd5e156a6259b01aa8cdc7372c6efde1e · WEB
- https://github.com/OWASP/java-html-sanitizer/commit/d6e0463ed3b48777ecd187913ffdbe767508ff45 · WEB
- https://github.com/OWASP/java-html-sanitizer · PACKAGE
History
- 3 Dec 2026 17:56 UTC · NVD: status Analyzed → Modified; description edited
- 3 Dec 2026 17:56 UTC · OSV: affected list changed (1 entry)
- 3 Dec 2026 16:56 UTC · CVE List: first stored (published 26 Nov 2025)
- 25 Nov 2026 20:59 UTC · NVD: first stored (published 26 Nov 2025)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 25 Nov 2025)