Summary
jackson-databind quadratic forward-reference completion
When an @JsonIdentityInfo collection or map first creates N unresolved
object-ID references and later resolves the same IDs in reverse order,
jackson-databind scans the remaining pending-reference accumulator for each
resolution. A shallow JSON document whose size grows linearly can therefore
cause quadratic CPU work during deserialization.
Details
The affected path is forward-reference completion inCollectionDeserializer.CollectionReferringAccumulator.resolveForwardReference()
and the corresponding map implementation. The implementation performs a
linear search of the pending accumulator for every resolved object ID.
The behavior is runtime-confirmed in jackson-databind 2.5.0, 2.22.1, and
3.2.1. Current 2.22 and 3.2 source branches retained the same design when
rechecked. A 2.4.0 control fails closed before successful reverse-order
completion, so 2.5.0 is the conservative runtime-confirmed affected floor.
The patched versions are: 2.18.11, 2.21.7, 2.22.3, 3.1.7 and 3.2.3.
The vulnerable application must deserialize attacker-influenced JSON into an
identity-enabled collection or map. The issue does not require deep nesting or
syntactically unusual JSON.
Suggested correction: replace repeated linear lookup/removal with a keyed
pending-reference structure or another design that provides linear or
amortized-linear completion. A regression should preserve input order,
duplicate-ID behavior, and unresolved-ID errors while bounding reverse-order
resolution work.
PoC
The proof constructs a shallow collection containing N unresolved@JsonIdentityInfo references followed by definitions of those same IDs in
reverse order. Its ID class counts equals() calls, giving a deterministic
work measure rather than a timing-dependent result.
With N=2,000, affected versions perform exactly 2,003,000 ID comparisons. An
equally sized control in which every reference is already resolved performs
zero comparisons in the pending-reference lookup path. The run is bounded to
a 512 MiB JVM. The result demonstrates quadratic growth: approximatelyN * (N + 1) / 2 comparisons, plus fixed setup comparisons.
Requested credit: Daniel Birtwhistle
Impact
An unauthenticated source that can submit JSON to an application using the
affected identity-enabled collection or map shape can consume quadratic CPU
and exhaust a request-time or worker-capacity budget, causing denial of
service. The application model/configuration prerequisite is material. No
confidentiality, integrity, code-execution, or parser-depth impact is claimed.
Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service. Typical impact: denial of service.
CVE-2026-91777 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.21.7, 3.1.7, 3.2.3, 2.18.11, 2.22.3); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
com.fasterxml.jackson.core:jackson-databind to 2.21.7 or later; tools.jackson.core:jackson-databind to 3.1.7 or later; tools.jackson.core:jackson-databind to 3.2.3 or later; com.fasterxml.jackson.core:jackson-databind to 2.18.11 or later; com.fasterxml.jackson.core:jackson-databind to 2.22.3 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-91777? CVE-2026-91777 is a high-severity uncontrolled resource consumption vulnerability in com.fasterxml.jackson.core:jackson-databind (maven), affecting versions >= 2.19.0, <= 2.21.6. It is fixed in 2.21.7, 3.1.7, 3.2.3, 2.18.11, 2.22.3. Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service.
- How severe is CVE-2026-91777? CVE-2026-91777 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2026-91777?
com.fasterxml.jackson.core:jackson-databind(maven) (versions >= 2.19.0, <= 2.21.6)tools.jackson.core:jackson-databind(maven) (versions >= 3.0.0, <= 3.1.6)
- Is there a fix for CVE-2026-91777? Yes. CVE-2026-91777 is fixed in 2.21.7, 3.1.7, 3.2.3, 2.18.11, 2.22.3. Upgrade to this version or later.
- Is CVE-2026-91777 exploitable, and should I be worried? Whether CVE-2026-91777 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-91777 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-91777?
- Upgrade
com.fasterxml.jackson.core:jackson-databindto 2.21.7 or later - Upgrade
tools.jackson.core:jackson-databindto 3.1.7 or later - Upgrade
tools.jackson.core:jackson-databindto 3.2.3 or later - Upgrade
com.fasterxml.jackson.core:jackson-databindto 2.18.11 or later - Upgrade
com.fasterxml.jackson.core:jackson-databindto 2.22.3 or later
- Upgrade