WaratekVRT Sign in

CVE-2021-23899 OWASP json-sanitizer

Affected softwareOWASP json-sanitizer
Severity9.8 Critical CVSS 3.1 2 scores
Fixed in1.2.2
WeaknessXML external entity (XXE) (CWE-611)
Published13 Jan 2021
Updated17 Jun 2026

Description

OWASP json-sanitizer before 1.2.2 may emit closing SCRIPT tags and CDATA section delimiters for crafted input. This allows an attacker to inject arbitrary HTML or XML into embedding documents.

Exploitation status

No public exploit

No exploit has been reported in the sources we check. Published 5 years ago.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment no assessment published
  • Indexed PoC none indexed
  • EPSS 2.1% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

  • Protection full XXE
  • Action available security rule
  • Review automated Inferred
  • Record active
Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR xxe security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-611: XML External Entity Reference.
Candidate fix https://github.com/OWASP/json-sanitizer/commit/a37f594f7378a1c76b3283e0dab9e1ab1dc0247e : a commit: the change itself

How to mitigate CVE-2021-23899

Upgrade OWASP json-sanitizer to 1.2.2 or later. Until you can, Waratek RASP blocks exploitation with its XXE rule. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

CVSS

9.8 CRITICAL v3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 9.8 CRITICAL CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H NVD Primary published
CVSS 2.0 7.5 none AV:N/AC:L/Au:N/C:P/I:P/A:P NVD Primary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
com.mikesamuel:json-sanitizer 0 1.2.2 unbounded

Products and versions

2 products, 2 version entries
SourceVendorProductSchemeAffected versions
osv com.mikesamuel json-sanitizer generic < 1.2.2
nvd owasp json-sanitizer generic < 1.2.2

References

URLTags
https://github.com/OWASP/json-sanitizer/commit/a37f594f7378a1c76b3283e0dab9e1ab1dc0247e commit
https://github.com/OWASP/json-sanitizer/compare/v1.2.1...v1.2.2 WEB
https://groups.google.com/g/json-sanitizer-support/c/dAW1AeNMoA0 WEB

Timeline

Published2021-01-13By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.