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

> Attackers can cause a denial of service by sending deeply nested JSON, triggering stack exhaustion in the json-smart library.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Mar 2023
- **Updated:** 27 Feb 2025
- **Also known as:** CLEANSTART-2026-SG86847, CLEANSTART-2026-VC78491, CLSA-2025-1761005192, CLSA-2026-1791879047, CLSA-2026-1791879577, CLSA-2026-1792010833, CLSA-2026-1793129552, CLSA-2026-1793129826, DEBIAN-CVE-2023-1370, ECHO-55ea-dc8d-51d3, GHSA-493p-pfq6-5258, MINI-24x9-5c6h-p3qj, MINI-2h9p-p236-2896, MINI-gh9h-6r3v-56mq, MINI-gvg2-3jq3-crm7, MINI-j2vq-fpc4-p9cw, MINI-jc64-q65f-2f47, OESA-2023-1203, OESA-2023-1223, OESA-2023-1224, OESA-2023-1225, RHLW-2026-27d20d7df55218f5, RHSA-2023:3362, ROOT-APP-MAVEN-CVE-2023-1370, UBUNTU-CVE-2023-1370

## What is CVE-2023-1370?

CVE-2023-1370 is a high-severity denial of service vulnerability in json-smart, published on 13 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

[Json-smart](https://netplex.github.io/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.

Weakness: CWE-674 (Uncontrolled Recursion)

## Which versions are affected by CVE-2023-1370?

2 open source packages ship an affected version, including net.minidev:json-smart. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `net.minidev:json-smart` | Maven | All versions | 2.4.9 |
| `net.minidev:json-smart` | Maven | All versions | 2.4.9 |
| `jenkins-2-plugins` | Red Hat:openshift:4.10::el8 | All versions | 0:4.10.1684982411-1.el8 |

Products: Json-Smart Project Json-Smart.

## How do I fix CVE-2023-1370?

Upgrade net.minidev:json-smart to 2.4.9 or later.

## Is CVE-2023-1370 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-1370 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-1370 and fix it if it is affected.

What it is: CVE-2023-1370 is a high-severity denial of service vulnerability in json-smart, published on 13 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-1370 exists.

Affected packages and fixed versions:
- net.minidev:json-smart (Maven): affected all versions; fixed in 2.4.9
- net.minidev:json-smart (Maven): affected all versions; fixed in 2.4.9

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-1370/ (Markdown: https://insights.sbomify.com/CVE-2023-1370/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-1370
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-1370
- OSV: https://osv.dev/vulnerability/CVE-2023-1370

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-1370/
Summaries are generated and may contain mistakes; the official description above is the record.
