The vulnerability lies in the bypass of the maxNestingDepth constraint in jackson-core, specifically within the UTF8DataInputJsonParser and ReaderBasedJsonParser classes. The advisory and the provided commit 8b25fd67f20583e75fb09564ce1eaab06cd5a902 clearly indicate the source of the vulnerability. The patch modifies two key files:
-
src/main/java/tools/jackson/core/json/UTF8DataInputJsonParser.java: The change is within the _nextTokenNotInObject method. Previously, it directly created a new child context using _streamReadContext.createChildArrayContext or _streamReadContext.createChildObjectContext. This direct creation bypassed the nesting depth check. The fix replaces these calls with createChildArrayContext and createChildObjectContext methods, which were introduced to centralize and enforce the maxNestingDepth constraint.
-
src/main/java/tools/jackson/core/json/ReaderBasedJsonParser.java: A similar flaw existed in the nextLongValue method. It also created child contexts without validation. The patch applies the same fix, redirecting the context creation to the new, safer methods.
By analyzing these changes, it's evident that any code path leading to the execution of _nextTokenNotInObject in UTF8DataInputJsonParser or nextLongValue in ReaderBasedJsonParser with a malicious, deeply nested JSON input would trigger the vulnerability. These functions are therefore the primary indicators that would appear in a runtime profile during exploitation.