Skip to content

Potential for StackoverflowError if you parse an input file that contains very deeply nested data

High
pjfanning published GHSA-h46c-h94j-95f3 Jun 25, 2025

Package

maven com.fasterxml.jackson.core:jackson-core (Maven)

Affected versions

<2.15.0

Patched versions

2.15.0

Description

Impact

With older versions of jackson-core, if you parse an input file and it has deeply nested data, Jackson could end up throwing a StackoverflowError if the depth is particularly large.

Patches

jackson-core 2.15.0 contains a configurable limit for how deep Jackson will traverse in an input document, defaulting to an allowable depth of 1000. Change is in #943. jackson-core will throw a StreamConstraintsException if the limit is reached.
jackson-databind also benefits from this change because it uses jackson-core to parse JSON inputs.

Workarounds

Users should avoid parsing input files from untrusted sources.

Severity

High

CVE ID

CVE-2025-52999

Weaknesses

Stack-based Buffer Overflow

A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). Learn more on MITRE.