REDHAT-BUG-2539083: High severity fasterxml jackson-databind vulnerability
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 Software
Event History
Frequently Asked Questions
Which deployments are exposed?
Exposure requires name-based polymorphism with a defaultImpl or equivalent fallback, attacker-influenced type IDs, and a long-lived ObjectMapper reused across requests. Applications without that combination are not described as affected.
What does an attacker need to do to cause memory retention?
The attacker must repeatedly provide distinct unrecognized type IDs. Each new unknown ID can be retained as a separate key even though all such IDs resolve to the same fallback deserializer.
Does repeating the same invalid type ID have the same effect?
No. The reported test retained 10,000 entries for 10,000 distinct unknown IDs, while repeating one unknown ID 10,000 times resulted in a single entry. The issue is driven by attacker-controlled type-ID cardinality rather than request volume alone.
What changes in the fix?
The fix prevents caching fallback resolutions for unrecognized IDs and limits both the number of cached entries and the length of a type ID eligible for caching.