CVE-2026-91777
JSON

7.5high

jackson-databind: quadratic forward-reference completion in Collection and Map deserializers

Severity
7.5high CVSS:3.1 by HeroDevs
Exploit likelihood
0.56% (higher than 48% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
HeroDevs
Also known as
GHSA-cxp5-3px4-pw24

Description

Forward-reference completion for @JsonIdentityInfo object IDs in FasterXML jackson-databind performs a linear scan of the pending-reference accumulator for every resolved ID. The affected paths are CollectionDeserializer.CollectionReferringAccumulator.resolveForwardReference() and the equivalent implementation in MapDeserializer. When a document first creates N unresolved object-ID references in an identity-enabled collection or map and then defines those same IDs in reverse order, completion performs on the order of N * (N + 1) / 2 identity comparisons, so a shallow document whose size grows linearly causes quadratic CPU work during deserialization. The reporter instrumented equals() calls on the ID class and measured exactly 2,003,000 comparisons at N = 2,000, against zero comparisons in the pending-reference lookup path for an equally sized control in which every reference was already resolved. The input requires no deep nesting and no syntactically unusual JSON. Exploitation requires an application that deserializes attacker-influenced JSON into an identity-enabled collection or map. The fix replaces the repeated linear lookup with a keyed pending-reference structure.

Affected

Product or packageVersionsReported by
com.fasterxml.jackson.core:jackson-databindfrom 2.5.0 up to 2.18.10, from 2.19.0 up to 2.21.6, from 2.22.0 up to 2.22.2CVE List
tools.jackson.core:jackson-databindfrom 3.0.0 up to 3.1.6, from 3.2.0 up to 3.2.2CVE List
com.fasterxml.jackson.core:jackson-databind (Maven)from 2.19.0 before 2.21.7, from 2.5.0 before 2.18.11, from 2.22.0 before 2.22.3GitHub Advisory Database
tools.jackson.core:jackson-databind (Maven)from 3.0.0 before 3.1.7, from 3.2.0 before 3.2.3GitHub Advisory Database

All scores

HeroDevs7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-400

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

Forward-reference completion for @JsonIdentityInfo object IDs in FasterXML jackson-databind performs a linear scan of the pending-reference accumulator for every resolved ID. The affected paths are CollectionDeserializer.CollectionReferringAccumulator.resolveForwardReference() and the equivalent implementation in MapDeserializer. When a document first creates N unresolved object-ID references in an identity-enabled collection or map and then defines those same IDs in reverse order, completion performs on the order of N * (N + 1) / 2 identity comparisons, so a shallow document whose size grows linearly causes quadratic CPU work during deserialization. The reporter instrumented equals() calls on the ID class and measured exactly 2,003,000 comparisons at N = 2,000, against zero comparisons in the pending-reference lookup path for an equally sized control in which every reference was already resolved. The input requires no deep nesting and no syntactically unusual JSON. Exploitation requires an application that deserializes attacker-influenced JSON into an identity-enabled collection or map. The fix replaces the repeated linear lookup with a keyed pending-reference structure.

GitHub Advisory Database
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

References

https://github.com/FasterXML/jackson-databind/security/advisories/GHSA-cxp5-3px4-pw24exploit, vendor-advisory, web
https://github.com/FasterXML/jackson-databind/issues/6204patch, web
https://nvd.nist.gov/vuln/detail/CVE-2026-91777advisory
https://github.com/FasterXML/jackson-databind/pull/6204web
https://github.com/FasterXML/jackson-databind/commit/37ad9b81712cbb9fb62c2d2c1813593252a24b67web
https://github.com/FasterXML/jackson-databindpackage
https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.18.11web
https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.21.7web
https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.22.3web
https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-3.1.7web
https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-3.2.3web

Sources

SourceRecordLicence
CVE ListCVE-2026-91777 changed 2026-09-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-cxp5-3px4-pw24 changed 2026-09-30CC-BY-4.0
NVDCVE-2026-91777 changed 2026-09-24Public domain