Miggo Logo

CVE-2024-57699: Netplex Json-smart Uncontrolled Recursion vulnerability

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.05204%
Published
2/6/2025
Updated
3/12/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
net.minidev:json-smartmaven>= 2.5.0, < 2.5.22.5.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is an uncontrolled recursion (stack exhaustion) when parsing a specially crafted JSON with excessive nesting. The fix involves adding the LIMIT_JSON_DEPTH flag to predefined parser modes (MODE_RFC4627, MODE_JSON_SIMPLE, MODE_STRICTEST) in JSONParser.java. This implies that before the patch, these modes were vulnerable. The JSONParser constructor (<init>) is used to create a parser instance, potentially with one of these vulnerable modes. The parse method of this JSONParser instance is then used to process the JSON input, and it's this method (and the internal recursive methods it calls for parsing objects/arrays) that would exhaust the stack if no depth limit is enforced. The added test file TestCVE202457699.java explicitly shows the instantiation of JSONParser with these modes and then calling the parse method with a malicious string designed to cause deep recursion.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* s**urity issu* w*s *oun* in N*tpl*x Json-sm*rt *.*.* t*rou** *.*.*. W**n lo**in* * sp**i*lly *r**t** JSON input, *ont*inin* * l*r** num**r o* ’{’, * st**k *x**ustion **n ** tri***r, w*i** *oul* *llow *n *tt**k*r to **us* * **ni*l o* S*rvi** (*oS).

Reasoning

T** vuln*r**ility is *n un*ontroll** r**ursion (st**k *x**ustion) w**n p*rsin* * sp**i*lly *r**t** JSON wit* *x**ssiv* n*stin*. T** *ix involv*s ***in* t** `LIMIT_JSON_**PT*` *l** to pr****in** p*rs*r mo**s (`MO**_R******`, `MO**_JSON_SIMPL*`, `MO**_