Skip to content

Deeply nested JsonNode throws StackOverflowError for toString()

Moderate
cowtowncoder published GHSA-3wrr-7qpf-2prh May 28, 2026

Package

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

Affected versions

2.10.0 - 2.13.5

Patched versions

2.14.0

Description

Impact

Potential Denial-of-Service when attacker sends deeply nested JSON if (and only if) service:

  1. Reads deeply nested (1000s of levels) JSON as JsonNode (ObjectMapper.readTree())
  2. Writes out same (or modifided) node using JsonNode.toString()

which can consume significant amount of resources with concurrent relatively small requests (1000 nested arrays is 2kB).

Patches

Fixed in 2.14.0 via #3447 .

Workarounds

Avoid serializing JsonNode using toString(): use ObjectMapper.writeValueAsString(node)

References

Severity

Moderate

CVE ID

CVE-2026-50193

Weaknesses

Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource. Learn more on MITRE.

Credits