Miggo Logo

CVE-2025-52999: jackson-core Deep Nesting Stack Overflow Denial of Service Vulnerability

8.7

CVSS Score
4.0

Basic Information

EPSS Score
0.20096%
Published
6/27/2025
Updated
6/27/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package NameEcosystemVulnerable VersionsFirst Patched Version
com.fasterxml.jackson.core:jackson-coremaven< 2.15.02.15.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a classic stack-based buffer overflow, specifically a StackOverflowError in Java, caused by unbounded recursion. This occurs in various JSON parser implementations within the jackson-core library. The root cause is the lack of a depth check before creating a new JsonReadContext when the parser encounters the start of a nested JSON object ({) or array ([).

An attacker can craft a JSON input with an extremely large number of nested structures. When any of the jackson parsers (e.g., ReaderBasedJsonParser, UTF8StreamJsonParser) process this input, they recursively call methods to handle the nested content. Each level of nesting creates a new JsonReadContext object on the call stack. Without a limit, this chain of object creation continues until the stack space is exhausted, throwing a StackOverflowError and causing the application to crash, resulting in a denial of service.

The patch addresses this by introducing a configurable maxNestingDepth constraint. It adds new helper methods, createChildArrayContext and createChildObjectContext, in the base parser class ParserBase. These methods are now responsible for creating new contexts and, crucially, they first call validateNestingDepth to ensure the limit is not exceeded. The vulnerable functions identified are the various parser methods (nextToken, _nextAfterName, etc.) that were modified to use these new, safe helper methods instead of creating contexts directly. Any of these functions would appear in a stack trace during the exploitation of this vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t Wit* ol**r v*rsions o* j**kson-*or*, i* you p*rs* *n input *il* *n* it **s ***ply n*st** **t*, J**kson *oul* *n* up t*rowin* * St**kov*r*low*rror i* t** **pt* is p*rti*ul*rly l*r**. ### P*t***s j**kson-*or* *.**.* *ont*ins * *on*i*ur**l*

Reasoning

T** vuln*r**ility is * *l*ssi* st**k-**s** *u***r ov*r*low, sp**i*i**lly * `St**kOv*r*low*rror` in J*v*, **us** *y un*oun*** r**ursion. T*is o**urs in v*rious JSON p*rs*r impl*m*nt*tions wit*in t** `j**kson-*or*` li*r*ry. T** root **us* is t** l**k o