Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Oct 10, 2025

Just like Jackson 2.15+ we restrict the maximum allowed number of nested arrays or objects (or mixed) to 1000. Currently this limit is hardcoded, unlike Jackson, which allows to configure it. (we have sys property now, just like in the main branch as of #1072) 1000 should be enough for most real world use cases. We can still make it configurable later.

Note this is about OutOfMemoryError's, not about StackOverflowError's. StackOverflowError's are not a problem since we use a @tailrec optimized method. Therefore this fix is not 100% about CVE-2025-52999 (which in theory we do not run into) but just an additional precaution.

See

…ects (#1226)

Just like Jackson 2.15+ we restrict the maximum allowed number of nested arrays or
objects (or mixed) to 1000. This default can be changed via a sys property.
1000 should be enough for most real world use cases.
Note this is about OutOfMemoryError's, not about StackOverflowError's.
StackOverflowError's are not a problem since we use a @tailrec optimized
method. Therefore this fix is not 100% about CVE-2025-52999 (which in
theory we do not run into) but just an additional precaution.

(cherry picked from commit 9722c66)
@mkurz mkurz changed the title [3.0.x] [2.10.x] Avoid running out of memory when parsing heavily nested arrays or objects (backport #1226) by @mkurz [3.0.x] Avoid running out of memory when parsing heavily nested arrays or objects (backport #1226) by @mkurz Oct 10, 2025
@mkurz mkurz merged commit 50576c9 into 3.0.x Oct 10, 2025
37 of 49 checks passed
@mkurz mkurz deleted the mergify/bp/3.0.x/pr-1226 branch October 10, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants