CVE-2021-42575: Policies not properly enforced in OWASP Java HTML Sanitizer
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.74312%
CWE
Published
10/19/2021
Updated
1/27/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer | maven | < 20211018.1 | 20211018.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper handling of <style> tag content within <option> elements. The writeCloseTag
method in HtmlStreamRenderer.java
was modified to add validation
checks for dangerous CDATA sequences, indicating it was the primary vulnerable function. The pre-patch version directly appended user-controlled CDATA content without sanitization, making it the exploitation point for policy bypass attacks.