GitHub advisory · Maven
jackson-databind: Deeply nested JsonNode throws StackOverflowError for toString()
Description
Potential Denial-of-Service when attacker sends deeply nested JSON if (and only if) service:
JsonNode (ObjectMapper.readTree())JsonNode.toString()which can consume significant amount of resources with concurrent relatively small requests (1000 nested arrays is 2kB).
Fixed in 2.14.0 via https://github.com/FasterXML/jackson-databind/issues/3447.
Avoid serializing JsonNode using toString(): use ObjectMapper.writeValueAsString(node)
Manual fix · Maven
Sources