HIGH 7.5 Maven
jackson-databind: Deeply nested JsonNode throws StackOverflowError for toString()
GHSA-3wrr-7qpf-2prh · CVE-2026-50193
Published · Modified
AI SAST
Find this class of vulnerability in your own code
Corgea's AI-native static analysis detects vulnerabilities like this one across your repositories, ranks them by exploitability, and returns review-ready fixes.
Description
Impact
Potential Denial-of-Service when attacker sends deeply nested JSON if (and only if) service:
- Reads deeply nested (1000s of levels) JSON as
JsonNode(ObjectMapper.readTree()) - 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 https://github.com/FasterXML/jackson-databind/issues/3447.
Workarounds
Avoid serializing JsonNode using toString(): use ObjectMapper.writeValueAsString(node)
References
- WEB https://github.com/FasterXML/jackson-databind/security/advisories/GHSA-3wrr-7qpf-2prh
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-50193
- WEB https://github.com/FasterXML/jackson-databind/issues/3447
- WEB https://github.com/FasterXML/jackson-databind/commit/a1fa4ae4ecf5cee16da465985f135f3e81816f8c
- PACKAGE https://github.com/FasterXML/jackson-databind
Ready to move
Start Securing
Free, no credit card | First findings in minutes