Skip to content

GHSA-cxp5-3px4-pw24 CVE-2026-91777

jackson-databind quadratic forward-reference completion

High Maven
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.49%
Chance of exploitation in the next 30 days. Higher than 41.94% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-400 Uncontrolled Resource Consumption
Fix
Available
2 packages have a fixed version

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 versions

Maven

PackageVulnerableFixed in
com.fasterxml.jackson.core:jackson-databind
>= 2.19.0, < 2.21.7
2.21.7
com.fasterxml.jackson.core:jackson-databind
>= 2.5.0, < 2.18.11
2.18.11
com.fasterxml.jackson.core:jackson-databind
>= 2.22.0, < 2.22.3
2.22.3
tools.jackson.core:jackson-databind
>= 3.0.0, < 3.1.7
3.1.7
tools.jackson.core:jackson-databind
>= 3.2.0, < 3.2.3
3.2.3

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

com.fasterxml.jackson.core:jackson-databind Maven → 2.21.7

maven
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>2.21.7</version></dependency>
gradle
implementation("com.fasterxml.jackson.core:jackson-databind:2.21.7")

tools.jackson.core:jackson-databind Maven → 3.1.7

maven
<dependency><groupId>tools.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>3.1.7</version></dependency>
gradle
implementation("tools.jackson.core:jackson-databind:3.1.7")

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-400: Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource.

How to prevent it
  • Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
  • Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
  • Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
  • Implementation: Ensure that all failures in resource allocation place the system into a safe posture.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-wv8q-qhhj-9h54
jackson-databind retains every unknown raw type ID
High Also affects com.fasterxml.jackson.core:jackson-databind
GHSA-q4xh-88c3-wmh7
jackson-databind: Duration XMLGregorianCalendar Unbounded Number Parse DoS
High Also affects com.fasterxml.jackson.core:jackson-databind
GHSA-gx83-3vf8-gh7j
jackson-databind: Comparable missing from DefaultBaseTypeLimitingValidator's unsafe base types (incomplete PolymorphicTypeValidator denylist)
Medium Also affects com.fasterxml.jackson.core:jackson-databind
GHSA-wjgm-6hv5-3cvf
jackson-databind: Path Deserialization Missing Scheme Allowlist for FileSystemProvider Resolution
Medium Also affects com.fasterxml.jackson.core:jackson-databind
GHSA-vvgp-rfg2-7rr6
jackson-databind: Incomplete fix for CVE-2026-54514: eager DNS resolution (SSRF) still present in InetAddress deserialization
Medium Also affects com.fasterxml.jackson.core:jackson-databind
GHSA-mhm7-754m-9p8w
jackson-databind: `@JsonView` bypass for creator properties with `@JsonTypeInfo(include=As.EXTERNAL_PROPERTY)`
Medium Also affects com.fasterxml.jackson.core:jackson-databind
GHSA-5gvw-p9qm-jgwh
jackson-databind: @JsonView bypassed for @JsonUnwrapped container properties on deserialization
Medium Also affects com.fasterxml.jackson.core:jackson-databind
GHSA-3pjw-73gf-8qr5
jackson-databind: @JsonIgnore on a Record property is bypassed with a PropertyNamingStrategy
Medium Also affects com.fasterxml.jackson.core:jackson-databind
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor