You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I test the latest version(20231013) of JSON-java by CIFuzz,a OOM security issue was found, it caused when put a big number in JSONArray, may cause denial of service issues in applications via the follow code:
new org.json.JSONArray().put(1829517625, 1.0719845412539998E291);
The text was updated successfully, but these errors were encountered:
JSON does not support the concept of "sparse arrays" as you would need an index => value mapping which effectively is a JSONObject then. You have to think about how your created object would be stringified: It would be [,,,(1829517624 commas in total),,, 1.0719845412539998E291]
and you could already avoid parsing this. On the other hand your example can only be created directly from code so the 'security issue' can only be injected by the programmer deliberately and can be migitated by checks for the index to be in a sane range.
When I test the latest version(20231013) of JSON-java by CIFuzz,a OOM security issue was found, it caused when put a big number in JSONArray, may cause denial of service issues in applications via the follow code:
The text was updated successfully, but these errors were encountered: