Skip to content
Fencer Vulns
critical 9.8

CVE-2021-42575 json

Policies not properly enforced in OWASP Java HTML Sanitizer

published 2021-10-18 5 y ago modified 2026-06-17 4 mo ago also GHSA-3w73-fmf3-hg5c , EUVD-2021-2151

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
3.0%
EPSS 3.0% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

The OWASP Java HTML Sanitizer before 20211018.1 does not properly enforce policies associated with the SELECT, STYLE, and OPTION elements.

Patch / fix

  • maven com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer 20211018.1
  • owasp java_html_sanitizer 20211018.2
  • rh-sso7 red hat single sign on 7.6 1-5.el9sso
  • rh-sso7-runtime red hat single sign on 7.6 1-5.el9sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.3-1.redhat_00001.1.el9sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.3-1.redhat_00001.1.el9sso
  • rh-sso7-javapackages-tools red hat single sign on 7.6 6.0.0-7.el9sso
  • rh-sso7-python3-javapackages red hat single sign on 7.6 6.0.0-7.el9sso
  • rh-sso7-javapackages-filesystem red hat single sign on 7.6 6.0.0-7.el9sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.3-1.redhat_00001.1.el7sso

red hat advisories RHSA-2022:7411RHSA-2022:7409RHSA-2022:7410

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-42575 updated cvss 9.8

owasp-java-html-sanitizer: improper policies enforcement may lead to remote code execution

  • Red Hat Single Sign-On 7.6 for RHEL 7 Server rh-sso7-keycloak 18.0.3-1.redhat_00001.1.el7sso, rh-sso7-keycloak-server 18.0.3-1.redhat_00001.1.el7sso
    fixed: vendor fix RHSA-2022:7409
  • Red Hat Single Sign-On 7.6 for RHEL 8 rh-sso7-keycloak 18.0.3-1.redhat_00001.1.el8sso, rh-sso7-keycloak-server 18.0.3-1.redhat_00001.1.el8sso
    fixed: vendor fix RHSA-2022:7410
  • Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7 1-5.el9sso, rh-sso7-runtime 1-5.el9sso, rh-sso7-keycloak 18.0.3-1.redhat_00001.1.el9sso, rh-sso7-keycloak-server 18.0.3-1.redhat_00001.1.el9sso
    fixed: vendor fix RHSA-2022:7411
  • Red Hat Single Sign-On 7.6.1
    fixed: vendor fix RHSA-2022:7417
  • Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7-javapackages-tools 6.0.0-7.el9sso, rh-sso7-python3-javapackages 6.0.0-7.el9sso, rh-sso7-javapackages-filesystem 6.0.0-7.el9sso
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.97% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • docs.google.com https://docs.google.com/document/d/11SoX296sMS0XoQiQbpxc5pNxSdbJKDJkm5BDv0zrX50/ referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer
<20211018.1
20211018.1

Classification

Weakness
  • CWE-20 Improper Input Validation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.