Skip to content

json-smart Uncontrolled Recursion vulnerabilty

High severity GitHub Reviewed Published Mar 23, 2023 in oswaldobapvicjr/jsonmerge • Updated Jul 6, 2023

Package

maven net.minidev:json-smart (Maven)

Affected versions

< 2.4.9

Patched versions

2.4.9

Description

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

References

Published by the National Vulnerability Database Mar 22, 2023
Published to the GitHub Advisory Database Mar 23, 2023
Reviewed Mar 23, 2023
Last updated Jul 6, 2023

Severity

High
7.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weaknesses

CVE ID

CVE-2023-1370

GHSA ID

GHSA-493p-pfq6-5258
Checking history
See something to contribute? Suggest improvements for this vulnerability.