CVE-2026-91776
JSON

7.5high

jackson-databind: unbounded growth of the type id cache in TypeDeserializerBase retains every unknown raw type ID

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-wv8q-qhhj-9h54

Description

TypeDeserializerBase._findDeserializer() in FasterXML jackson-databind caches the resolved deserializer under the raw, attacker-supplied type ID. When name-based polymorphism is configured with a fallback, for example @JsonTypeInfo(use = Id.NAME, defaultImpl = ...), every distinct unrecognized type ID resolves to the same fallback deserializer but is retained as its own key in the _deserializers map. That map has no configurable bound and lives for the lifetime of the type deserializer, so an attacker who can repeatedly supply fresh unknown type IDs causes monotonic memory retention across requests. The reporter observed 10,000 retained entries from 10,000 distinct unknown IDs, against a single entry for a control that repeated one unknown ID the same number of times, isolating attacker-controlled key cardinality from request volume. Exploitation requires an application that enables name-based polymorphism with a defaultImpl or equivalent fallback, accepts attacker-influenced type IDs, and reuses a long-lived ObjectMapper across requests. The fix stops caching fallback resolutions for unrecognized IDs and bounds both the number of cached entries and the length of a cacheable type ID.

Affected

Product or packageVersionsReported by
com.fasterxml.jackson.core:jackson-databindfrom 2.0.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.0.0 before 2.18.11, from 2.19.0 before 2.21.7, 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

TypeDeserializerBase._findDeserializer() in FasterXML jackson-databind caches the resolved deserializer under the raw, attacker-supplied type ID. When name-based polymorphism is configured with a fallback, for example @JsonTypeInfo(use = Id.NAME, defaultImpl = ...), every distinct unrecognized type ID resolves to the same fallback deserializer but is retained as its own key in the _deserializers map. That map has no configurable bound and lives for the lifetime of the type deserializer, so an attacker who can repeatedly supply fresh unknown type IDs causes monotonic memory retention across requests. The reporter observed 10,000 retained entries from 10,000 distinct unknown IDs, against a single entry for a control that repeated one unknown ID the same number of times, isolating attacker-controlled key cardinality from request volume. Exploitation requires an application that enables name-based polymorphism with a defaultImpl or equivalent fallback, accepts attacker-influenced type IDs, and reuses a long-lived ObjectMapper across requests. The fix stops caching fallback resolutions for unrecognized IDs and bounds both the number of cached entries and the length of a cacheable type ID.

GitHub Advisory Database
Summary

With @JsonTypeInfo(use = Id.NAME, defaultImpl = ...), every distinct unknown raw type ID selects the same fallback deserializer but is retained as a separate key in TypeDeserializerBase._deserializers. An attacker who can repeatedly supply new unknown type IDs can grow this process-lifetime cache without a configured bound.

Details

The affected path is TypeDeserializerBase._findDeserializer(). After an unknown name-based type ID resolves to the configured fallback/default implementation, jackson-databind caches the result under the attacker-provided raw typeId. Although all such IDs select the same fallback deserializer, each new string remains a distinct cache key.

The behavior is runtime-confirmed in jackson-databind 2.22.1 and 3.2.1. Current 2.22 and 3.2 source branches retained the unbounded _deserializers map and per-raw-ID cache write when rechecked. The earlier affected floor has not been established, patched versions are: 2.18.11, 2.21.7, 2.22.3, 3.1.7 and 3.2.3.

The vulnerable application must enable name-based polymorphism with a defaultImpl or equivalent fallback, accept attacker-influenced type IDs, and reuse a long-lived mapper/type deserializer across requests.

Suggested correction: avoid caching each unknown raw ID when every such ID resolves to the same fallback, use a fallback sentinel, or use an explicitly bounded concurrency-safe cache. A regression should contrast many distinct unknown IDs with repetitions of one unknown ID across requests.

PoC

Configure a polymorphic base type with @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, defaultImpl = Fallback.class) and deserialize inputs containing unknown type names through the same mapper. Inspect TypeDeserializerBase._deserializers after the run.

On affected 2.x and 3.x versions, 10,000 distinct unknown raw type IDs produce 10,000 retained cache entries even though every input selects the same fallback deserializer. A matched control that repeats one unknown ID 10,000 times produces one retained entry. This isolates attacker-controlled key cardinality from ordinary request count.

Impact

Where the stated polymorphic fallback configuration is exposed to attacker-influenced type IDs, distinct inputs cause incremental process-lifetime memory retention and eventual availability pressure or denial of service. This is not claimed as a single-request allocation spike, and no fixed bytes-per-ID or time-to-out-of-memory value is asserted. No confidentiality, integrity, or code-execution impact is claimed.

Requested credit: Daniel Birtwhistle

References

https://github.com/FasterXML/jackson-databind/security/advisories/GHSA-wv8q-qhhj-9h54exploit, vendor-advisory, web
https://github.com/FasterXML/jackson-databind/issues/6203patch, web
https://nvd.nist.gov/vuln/detail/CVE-2026-91776advisory
https://github.com/FasterXML/jackson-databind/commit/2870d1d6dc1b7e1c07ee11dd5b04ab71cddbb577web
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-91776 changed 2026-09-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-wv8q-qhhj-9h54 changed 2026-09-30CC-BY-4.0
NVDCVE-2026-91776 changed 2026-09-24Public domain