NetSight
medium5.9

CVE-2026-59171

JSON-java: JSONTokener Has Unbounded Numeric String Resource-Exhaustion DoS

Impact

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.

An attacker can exploit this over the network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: high risk of outages.

Affected packages

EcosystemPackageAffectedFixed in
mavenorg.json:json>= 20150729, < 2026071920260719

Affected products · Stleary

ProductAffected versions
JSON-java
from 20150729, before 20260719

Weakness classification

References