# CVE-2025-66021: OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization

- Severity: High 8.6 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 23% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-11-25T22:10:17.000Z
- Modified: 2026-10-18T20:10:00.110Z
- Also known as: GHSA-g9gq-3pfx-2gw2
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- OWASP java-html-sanitizer: = 20240325.1
- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven): from 20240325.1 before 20260101.1
- owasp java_html_sanitizer: 20240325.1

## Every score

- GitHub_M: CVSS:4.0 8.6 High `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: CVSS:4.0 High `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: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/OWASP/java-html-sanitizer/security/advisories/GHSA-g9gq-3pfx-2gw2> (exploit, vendor-advisory, 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)

## Sources

- CVE List: [CVE-2025-66021](https://www.cve.org/CVERecord?id=CVE-2025-66021), CVE Terms of Use, modified 2025-11-26
- GitHub Advisory Database: [GHSA-g9gq-3pfx-2gw2](https://github.com/advisories/GHSA-g9gq-3pfx-2gw2), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-66021](https://nvd.nist.gov/vuln/detail/CVE-2025-66021), Public domain, modified 2026-10-18

---

Page: https://cve.day/CVE-2025-66021 · Whole record: https://cve.day/CVE-2025-66021.json · Rebuilt by cve.day 2026-11-25T22:59:08.030Z
