# CVE-2021-23899: Arbitrary code injection in json-sanitizer

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.09%, higher than 82% of CVEs (2026-12-01)
- Published: 2021-01-13T15:49:56.000Z
- Modified: 2026-06-17T03:39:00.263Z
- Also known as: GHSA-mm8j-9x84-m9cv
- Weaknesses: CWE-611
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- com.mikesamuel:json-sanitizer (Maven): before 1.2.2
- owasp json-sanitizer: before 1.2.2

## Every score

- GitHub: 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: 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: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/OWASP/json-sanitizer/compare/v1.2.1...v1.2.2> (patch, third-party-advisory, web)
- <https://groups.google.com/g/json-sanitizer-support/c/dAW1AeNMoA0> (third-party-advisory, web)
- <https://github.com/OWASP/json-sanitizer/commit/a37f594f7378a1c76b3283e0dab9e1ab1dc0247e> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23899> (advisory)

## Sources

- CVE List: [CVE-2021-23899](https://www.cve.org/CVERecord?id=CVE-2021-23899), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-mm8j-9x84-m9cv](https://github.com/advisories/GHSA-mm8j-9x84-m9cv), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-23899](https://nvd.nist.gov/vuln/detail/CVE-2021-23899), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23899 · Whole record: https://cve.day/CVE-2021-23899.json · Rebuilt by cve.day 2026-11-25T22:57:59.359Z
