CVE-2023-1370: Stack exhaustion in json-smart leads to denial of service when parsing malformed JSON

Published Mar 13, 2023
·
Updated

Json-smart is a performance focused, JSON processor lib.

When reaching a ‘[‘ or ‘{‘ character in the JSON input, the code parses an array or an object respectively.

It was discovered that the code does not have any limit to the nesting of such arrays or objects. Since the parsing of nested arrays and objects is done recursively, nesting too many of them can cause a stack exhaustion (stack overflow) and crash the software.

Other sources

Impact Affected versions of net.minidev:json-smart are vulnerable to Denial of Service (DoS) due to a StackOverflowError when parsing a deeply nested JSON array or object.

When reaching a ‘[‘ or ‘{‘ character in the JSON input, the code parses an array or an object respectively. It was discovered that the 3PP does not have any limit to the nesting of such arrays or objects. Since the parsing of nested arrays and objects is done recursively, nesting too many of them can cause stack exhaustion (stack overflow) and crash the software.

Patches This vulnerability was fixed in json-smart version 2.4.9, but the maintainer recommends upgrading to 2.4.10, due to a remaining bug.

Workarounds N/A

References - https://www.cve.org/CVERecord?id=CVE-2023-1370 - https://nvd.nist.gov/vuln/detail/CVE-2023-1370 - https://security.snyk.io/vuln/SNYK-JAVA-NETMINIDEV-3369748

GitHub

A flaw was found in the json-smart package. This security flaw occurs when reaching a ‘[‘ or ‘{‘ character in the JSON input, and the code parses an array or an object, respectively. The 3PP does not have any limit to the nesting of such arrays or objects. Since nested arrays and objects are parsed recursively, nesting too many of them can cause stack exhaustion (stack overflow) and crash the software.

netplex json-smart-v2 is vulnerable to a denial of service, caused by not limiting the nesting of arrays or objects. By sending a specially crafted input, a remote attacker could exploit this vulnerability to cause a stack exhaustion and crash the software.

IBM

Affected Software

11 affected componentsFixes available
redhat/jenkins<2-plugins-0:4.11.1686831822-1.el8
2-plugins-0:4.11.1686831822-1.el8
redhat/jenkins<2-plugins-0:4.12.1686649756-1.el8
2-plugins-0:4.12.1686649756-1.el8
redhat/jenkins<0:2.401.1.1686680404-3.el8
0:2.401.1.1686680404-3.el8
redhat/jenkins<2-plugins-0:4.10.1684982411-1.el8
2-plugins-0:4.10.1684982411-1.el8
redhat/json-smart<2.4.9
2.4.9
redhat/json-smart<2.4.10
2.4.10
Json-smart Project Json-smart=2.4.9
maven/net.minidev:json-smart<2.4.9
2.4.9
Json-smart Project Json-smart<2.4.9
IBM Planning Analytics<=2.1
IBM Planning Analytics<=2.0

Event History

Mar 13, 2023
CVE Published
via MITRE·09:04 AM
Data Sourced
via MITRE·09:04 AM
DescriptionSeverityWeakness
Mar 23, 2023
Advisory Published
via GitHub·08:32 PM
Apr 21, 2023
Data Sourced
via Red Hat·05:35 AM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2023-1370?

CVE-2023-1370 is a vulnerability in net.minidev:json-smart that allows for a denial of service attack by exploiting a StackOverflowError when parsing a deeply nested JSON array or object.

2

How does CVE-2023-1370 impact affected systems?

CVE-2023-1370 can lead to a denial of service condition in systems running vulnerable versions of net.minidev:json-smart when parsing deeply nested JSON arrays or objects.

3

What is the severity of CVE-2023-1370?

CVE-2023-1370 has a severity score of 7 out of 10, indicating a high severity vulnerability.

4

What is the affected software?

The affected software includes net.minidev:json-smart versions up to 2.4.9 and certain versions of json-smart and jenkins.

5

How do I fix CVE-2023-1370?

To fix CVE-2023-1370, update to version 2.4.9 of net.minidev:json-smart, version 2.4.10 of json-smart, or the specified patched versions of jenkins.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203