# CVE-2021-42575: Policies not properly enforced in OWASP Java HTML Sanitizer

Source: https://junglewise.ai/threats/cve-2021-42575-policies-not-properly-enforced-in-owasp-java-html-sanitizer  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-10-19  
License: CC BY 4.0 with a link back

CVE-2021-42575 · Severity: low · CVSS 3.1 · Published 2021-10-19

Policies not properly enforced in OWASP Java HTML Sanitizer

Technologies: [com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven)](https://junglewise.ai/threats/technologies/com-googlecode-owasp-java-html-sanitizer-owasp-java-html-sanitizer). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

**Is CVE-2021-42575 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-42575 being exploited in the wild.

**How severe is CVE-2021-42575?** Low severity, with a CVSS score of 3.1, published 19 October 2021.

**Which products and versions are affected?** com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven) ECOSYSTEM:introduced=0,fixed=20211018.1.

**Is there a fix for CVE-2021-42575?** Yes. com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven): upgrade to 20211018.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-42575?** Check whether you run com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven): upgrade to 20211018.1 or later

  ```sh
  # set com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer to 20211018.1 in your pom.xml or build.gradle
  ```


## Affected products

- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer (Maven) ECOSYSTEM:introduced=0,fixed=20211018.1

## Identifiers

- CVE-2021-42575
- GHSA-3w73-fmf3-hg5c

## Related threats

- [OWASP Java HTML Sanitizer is vulnerable to XSS via noscript tag and improper style tag sanitization](https://junglewise.ai/threats/cve-2025-66021-owasp-java-html-sanitizer-is-vulnerable-to-xss-via-noscript-tag)
- [OWASP HTML Sanitizer allows redirecting to an arbitrary URL when JavaScript is disabled](https://junglewise.ai/threats/cve-2011-4457-owasp-html-sanitizer-allows-redirecting-to-an-arbitrary-url-when)
