CVE-2025-66021
com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer: OWASP Java HTML Sanitizer vulnerable to XSS
Overview
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.
Source: OX vulnerability database
Severity
6.1 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness: CWE-79
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Maven | com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer | >=20240325.1, <20260101.1 | 20260101.1 |
Open a package to see all its vulnerabilities.
Operating systems · 5 fixes
Red Hat 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | owasp-java-html-sanitizer | wont fix |
| 8 | owasp-java-html-sanitizer | wont fix |
| 9 | owasp-java-html-sanitizer | wont fix |
chainguard 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| keycloak-26-4 | 26.4.7-r3 |
minimos 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| keycloak +1 | 26.4.7-r2 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-66021
- github.com https://github.com/OWASP/java-html-sanitizer
- github.com https://github.com/OWASP/java-html-sanitizer/commit/4149cf02ba84db13e8e9d7ee1b01b3f47238e072
- github.com https://github.com/OWASP/java-html-sanitizer/commit/b98cdf1cd5e156a6259b01aa8cdc7372c6efde1e
- github.com https://github.com/OWASP/java-html-sanitizer/commit/d6e0463ed3b48777ecd187913ffdbe767508ff45
- github.com https://github.com/OWASP/java-html-sanitizer/issues/363
- github.com https://github.com/OWASP/java-html-sanitizer/security/advisories/GHSA-g9gq-3pfx-2gw2
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-66021
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-66021
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.