Vulnerabilities · 2025 · Owasp
CVE-2025-66021
Owasp Java Html Sanitizer vulnerability
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.
Affected products
Java Html Sanitizer. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Owasp Java Html Sanitizer runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/OWASP/java-html-sanitizer/security/advisories/GHSA-g9gq-3pfx-2gw2
- nvd.nist.gov/vuln/detail/CVE-2025-66021
- github.com/OWASP/java-html-sanitizer/issues/363
- github.com/OWASP/java-html-sanitizer/commit/4149cf02ba84db13e8e9d7ee1b01b3f47238e072
- github.com/OWASP/java-html-sanitizer/commit/b98cdf1cd5e156a6259b01aa8cdc7372c6efde1e
- github.com/OWASP/java-html-sanitizer/commit/d6e0463ed3b48777ecd187913ffdbe767508ff45
- github.com/advisories/GHSA-g9gq-3pfx-2gw2
- nvd.nist.gov/vuln/detail/CVE-2025-66021
- cve.org/CVERecord?id=CVE-2025-66021
More vulnerabilities in Owasp products
CVE-2025-66022CVE-2025-54571CVE-2025-48866CVE-2024-23686CVE-2024-1019CVE-2023-48171CVE-2023-38285CVE-2023-38199All 41
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.