Executive brief
OWASP json-sanitizer is a library used to convert JSON-like content into valid JSON for safe processing. An attacker can crash applications using this library by sending specially crafted JSON with excessive nesting depth, triggering an unhandled exception that terminates the service.
Technical details
The vulnerability exists in the JsonSanitizer.sanitize() method's internal nesting depth tracking logic. When processing JSON with nesting depth exceeding the default maximum (64 levels), the library performs an out-of-bounds array access, throwing an unhandled ArrayIndexOutOfBoundsException. The attack requires only network-reachable input to the sanitize() function with no authentication required. An attacker can achieve denial of service by causing the application to crash. The issue affects versions 1.2.2, 1.2.3, and 1.2.4-SNAPSHOT, and a fix involves adding strict nesting depth validation before array access.
Affected products
- OWASP json-sanitizer 1.2.2, 1.2.3, 1.2.4-SNAPSHOT
Timeline
- 2026-01-26: disclosed: Vulnerability reported via GitHub issue #35
- 2026-08-28: advisory: CVE-2026-37736 published