CVE-2026-59171: JSON-java: JSONTokener Unbounded Numeric String Resource-Exhaustion DoS
JSON-java is a reference implementation of a JSON package in Java. From version 20150729 through 20260522, JSONTokener.nextSimpleValue can accumulate unbounded numeric tokens before JSONObject.stringToNumber passes them to BigInteger or BigDecimal conversion without a length limit. An application that parses attacker-controlled JSON or XML through JSONObject, JSONArray, or XML.toJSONObject can spend super-linear CPU time converting a sufficiently long numeric literal, blocking request-handling threads and causing denial of service. Strict mode and keep-strings settings in JSONParserConfiguration do not prevent the affected conversion path. Version 20260719 limits numeric conversion length.
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
JSON-javato a version that resolves this vulnerability.Fixed in 20260719
Frequently Asked Questions
Which applications are exposed to this denial-of-service issue?
Applications using affected JSON-java versions that parse attacker-controlled JSON or XML through JSONObject, JSONArray, or XML.toJSONObject are exposed. A long numeric literal can consume excessive CPU and block request-handling threads.
What does an attacker need to exploit the issue?
An attacker needs a way to supply JSON or XML that the application parses through an affected path. The malicious input contains a sufficiently long numeric token, which is accumulated and then converted through BigInteger or BigDecimal.
Do strict mode or keep-strings settings mitigate the vulnerable conversion?
No. Strict mode and keep-strings settings in JSONParserConfiguration do not prevent the affected numeric conversion path.
What version fixes the issue?
Version 20260719 limits numeric conversion length. The affected range is from version 20150729 through 20260522.