The vulnerability is a denial-of-service caused by a StackOverflowError when serializing a deeply nested JsonNode to a string. The root cause lies in the com.fasterxml.jackson.databind.node.InternalNodeMapper$NonRecursiveSerializer._serializeNonRecursive method, which, despite its name, used a recursive approach for serialization. When a user calls the toString() method on a JsonNode (defined in com.fasterxml.jackson.databind.node.BaseJsonNode), it triggers this serialization process. For each level of nesting in the JSON object, the _serializeNonRecursive method would call value.serialize(), which would in turn call back into the same serialization logic, creating a new frame on the call stack. With thousands of nesting levels, this exhausts the stack space, leading to a StackOverflowError and crashing the thread. The patch corrects this by replacing the recursive calls with a truly iterative, stack-based implementation that manages an explicit stack of iterators to traverse the JSON tree, thus avoiding deep recursion on the call stack.