You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some aspects of input document are prone to possible abuse, so that malicious sender can create specifically crafted documents to try to overload server. This includes things like:
(possibly?) Huge number of properties per JSON Object -- for some use cases construction of data structures with tens or hundreds of thousands of distinct keys can be problematic -- not implemented, no immediate plans; can create new issue if this is still desired (ditto for big Arrays)
and although streaming parser can typically handle many of these cases quite well, they can be very problematic for higher-level processing -- and even for streaming, for highly parallel processing.
So. It would be good to create a configurable set of options that:
Default to same safe set of limits for likely problematic cases (like limit nesting to what is known to typically fit in wrt stack frames; limit maximum property names)
Leave more speculative limits (text length) to unlimited (or very high)
Offer a simple way to configure limits (possibly only per JsonFactory, although it'd be really nice if per-parser overrides were possible)
(note: related to/inspired by FasterXML/jackson-databind#2816)
Some aspects of input document are prone to possible abuse, so that malicious sender can create specifically crafted documents to try to overload server. This includes things like:
StreamReadConstraints.maxNestingDepth()to constraint max nesting depth (default: 1000) [CVE-2025-52999]Â #943StreamReadConstraints-- default 1000 chars (fixessonatype-2022-6438)Â #827StreamReadConstraintslimit for longest textual value to allow (default: 5M in 2.15.0; 20M in 2.15.1)Â #863and although streaming parser can typically handle many of these cases quite well, they can be very problematic for higher-level processing -- and even for streaming, for highly parallel processing.
So. It would be good to create a configurable set of options that:
JsonFactory, although it'd be really nice if per-parser overrides were possible)Further reading: related material.
Here are some relevant links: