Critical
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-23899
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:42 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-23899
Complete source record
{
"id": "333b8bd19feba1bfef613f7b26a798d28d1d73d6ee9f38e5f819014a6f5116f7",
"url": "https://osv.dev/vulnerability/CVE-2021-23899",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-23899",
"summary": "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.",
"evidence": "osv:CVE-2021-23899",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2021-23899",
"aliases": [
"CVE-2021-23899",
"GHSA-mm8j-9x84-m9cv"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/owasp/json-sanitizer",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "c999c7f93096f927273c87bf439d7a992e3a39dc"
},
{
"fixed": "a37f594f7378a1c76b3283e0dab9e1ab1dc0247e"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:owasp:json-sanitizer:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.2.2"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "a37f594f7378a1c76b3283e0dab9e1ab1dc0247e"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v1.2.1",
"json-sanitizer-1.1",
"json-sanitizer-1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-23899.json",
"vanir_signatures": [
{
"id": "CVE-2021-23899-64d45075",
"digest": {
"threshold": 0.9,
"line_hashes": [
"323372626607349166269134064051460937550",
"281540624948202154016147908277489889112",
"10422161611163388661781270418470123039",
"293625421098164197743335124240358941919",
"50888934875141958073919872945025375517",
"156345042501500560997947285871748547822",
"190614891019192016033089170304439273891",
"206108665404963412418727983737632459797",
"311264598422190495706136753924968620857"
]
},
"source": "https://github.com/owasp/json-sanitizer/commit/a37f594f7378a1c76b3283e0dab9e1ab1dc0247e",
"target": {
"file": "src/test/java/com/google/json/JsonSanitizerTest.java"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2021-23899-6ec1aa4c",
"digest": {
"length": 857,
"function_hash": "105576089061181633384202976764767995078"
},
"source": "https://github.com/owasp/json-sanitizer/commit/a37f594f7378a1c76b3283e0dab9e1ab1dc0247e",
"target": {
"file": "src/test/java/com/google/json/FuzzyTest.java",
"function": "testSanitizerLikesFuzzyWuzzyInputs"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-23899-f59aed4b",
"digest": {
"threshold": 0.9,
"line_hashes": [
"186860049387706252174710437488261035074",
"118898535682368993706272517936523330768",
"77754662574044532338395744154173700562",
"145565775578802715228502711527023464545",
"282013172137993518429794730838349675663",
"31819421180844700569333099366287102771",
"12372445699804039305383296177418473916"
]
},
"source": "https://github.com/owasp/json-sanitizer/commit/a37f594f7378a1c76b3283e0dab9e1ab1dc0247e",
"target": {
"file": "src/test/java/com/google/json/FuzzyTest.java"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:18:24Z"
}
}
],
"modified": "2026-10-20T14:18:24.430449098Z",
"provider": "osv",
"references": [
"https://groups.google.com/g/json-sanitizer-support/c/dAW1AeNMoA0",
"https://github.com/OWASP/json-sanitizer/commit/a37f594f7378a1c76b3283e0dab9e1ab1dc0247e",
"https://github.com/OWASP/json-sanitizer/compare/v1.2.1...v1.2.2"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-23899",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388796,
"published_at": "2021-01-13T16:15:14.413+00:00"
}