CVE-2026-91777
jackson-databind quadratic forward-reference completion
Description
Summary
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 in
CollectionDeserializer.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: approximately
N * (N + 1) / 2 comparisons, plus fixed setup comparisons.
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.
Requested credit: Daniel Birtwhistle
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.fasterxml.jackson.core » jackson-databind | >= 2.5.0, < 2.18.11>= 2.19.0, < 2.21.7>= 2.22.0, < 2.22.3 | 2.18.11, 2.21.7, 2.22.3 |
| tools.jackson.core » jackson-databind | >= 3.0.0, < 3.1.7>= 3.2.0, < 3.2.3 | 3.1.7, 3.2.3 |
Blast radius
87% of the dependent artifacts (150,105) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 1,443,147 |
| 2 hops | 3,777,075 |
| 3 hops | 2,150,174 |
| 4 hops | 912,726 |
| 5 hops | 307,814 |
| 6 hops | 88,898 |
Most used dependents
- org.sonatype.central » central-publishing-maven-plugin22,513 usages
- org.springframework.boot » spring-boot-starter-web19,081 usages
- org.renjin » renjin-maven-plugin13,886 usages
- com.fasterxml.jackson.datatype » jackson-datatype-jsr31010,638 usages
- org.springframework.boot » spring-boot-maven-plugin8,665 usages
- org.springframework.boot » spring-boot-starter-actuator6,564 usages
- com.fasterxml.jackson.dataformat » jackson-dataformat-yaml6,005 usages
- org.testcontainers » testcontainers4,109 usages
- com.fasterxml.jackson.module » jackson-module-kotlin4,004 usages
- com.fasterxml.jackson.datatype » jackson-datatype-jdk83,840 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- org.apache.kafka » kafka-clients3,135 usages
- com.fasterxml.jackson.dataformat » jackson-dataformat-xml2,908 usages
- org.apache.spark » spark-core2,899 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/FasterXML/jackson-databind/security/advisories/GHSA-cxp5-3px4-pw24
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-91777
- Webhttps://github.com/FasterXML/jackson-databind/issues/6204
- Webhttps://github.com/FasterXML/jackson-databind/pull/6204
- Webhttps://github.com/FasterXML/jackson-databind/commit/37ad9b81712cbb9fb62c2d2c1813593252a24b67
- Packagehttps://github.com/FasterXML/jackson-databind
- Webhttps://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.18.11
- Webhttps://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.21.7
- Webhttps://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.22.3
- Webhttps://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-3.1.7
- Webhttps://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-3.2.3
