CVE-2021-23899
Java vulnerability analysis and mitigation

Overview

OWASP json-sanitizer before version 1.2.2 contains a vulnerability that allows attackers to inject arbitrary HTML or XML into embedding documents. The vulnerability (CVE-2021-23899) was discovered through fuzzing by Fabian Meumertzheim of Code Intelligence and was disclosed on January 13, 2021 (Google Blog, MITRE).

Technical details

The vulnerability exists in the json-sanitizer library's handling of closing SCRIPT tags and CDATA section delimiters for crafted input. When processing specially crafted input, the library may emit these dangerous elements, which can lead to cross-site scripting (XSS) attacks in embedding documents (JSON Support).

Impact

The vulnerability allows attackers to inject arbitrary HTML or XML into embedding documents, potentially leading to cross-site scripting (XSS) attacks. This could enable attackers to execute malicious scripts in the context of the affected application, potentially compromising user data or performing unauthorized actions (JSON Support).

Exploitability

The vulnerability was discovered through fuzzing techniques, specifically using Jazzer in OSS-Fuzz. The issue can be exploited by providing specially crafted input to applications using vulnerable versions of the json-sanitizer library (Google Blog).

Mitigation and workarounds

Users should update to json-sanitizer version 1.2.2 or later, which contains fixes for this vulnerability. The fixed version is available on Maven Central repository (JSON Support).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-76904CRITICAL9.8
  • Java logoJava
  • org.geotools.jdbc:gt-jdbc-postgis
NoYesAug 21, 2026
GHSA-mqjf-5f49-2fjhCRITICAL9.8
  • Java logoJava
  • org.geotools:gt-jdbc-postgis
NoYesAug 21, 2026
CVE-2026-61827HIGH8.7
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-bhttp
NoYesAug 20, 2026
CVE-2026-63202HIGH7.5
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-bhttp
NoYesAug 20, 2026
CVE-2026-63124HIGH7.5
  • Java logoJava
  • io.netty.incubator:netty-incubator-codec-bhttp
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management