jackson-databind validates the outer class of a class-name type ID but accepts attacker-selected classes inside its generic arguments, even when those classes violate the declared type or would be rejected as direct type IDs. This bypasses the generic-argument validation added for CVE-2026-54512 (GHSA-j3rv-43j4-c7qm), of which this is an incomplete fix. DatabindContext.resolveAndValidateGeneric() checks the outer class against the declared base type and then passes each argument from the type ID to validateTypeParameter(), which validates the argument against the outer base type rather than enforcing its corresponding declared generic binding. It also invokes validators with arguments that have not passed the subtype check those validators expect. Under the default DefaultBaseTypeLimitingValidator this accepts an unrelated class inside a generic subtype even when the same class is rejected as a direct type ID. Where an allowIfBaseType(...) rule approves the outer type, Jackson substitutes LaissezFaireSubTypeValidator, so the configured validator no longer restricts the embedded arguments. The element type of a plain array type ID such as [Lpkg.Gadget; is likewise left unvalidated once the array's base type is approved. Affected paths include annotation-based class-name polymorphism with a default Jackson 3.x JsonMapper, configured default typing in both Jackson 2.x and 3.x, and integrations that expose that default typing. The default-validator case requires no application-authored validator: with @JsonTypeInfo(use = Id.CLASS), a direct gadget type ID is rejected as "Not a subtype", while a type ID naming a generic wrapper around the same gadget is accepted and deserialized, including attacker-supplied bean properties. Where class-name default typing permits Map, a property declared as Map<String,String> accepts HashMap<FileSystemXmlApplicationContext,String>; map-key discovery then passes the attacker-controlled JSON property name to the selected class's one-string constructor. With Spring on the classpath and attacker-controlled XML the application can load, that constructor loads the XML and invokes ProcessBuilder.start() under the application account, giving arbitrary command execution. This issue affects com.fasterxml.jackson.core:jackson-databind from 2.10.0 and tools.jackson.core:jackson-databind from 3.0.0. Releases before 2.10.0 are not affected, because PolymorphicTypeValidator was introduced in jackson-databind 2.10.0.
jackson-databind binds a JSON string to a javax.xml.datatype.Duration or javax.xml.datatype.XMLGregorianCalendar field by passing the raw string verbatim to DatatypeFactory.newDuration(value) or newXMLGregorianCalendar(value) in CoreXMLDeserializers.Std.deserialize. These deserializers are registered by default with no opt-in, so a plain ObjectMapper or JsonMapper with no polymorphic typing and no special configuration reaches this path. The XML Schema lexical grammar permits numeric components of arbitrary length, which the JDK materializes through the native BigInteger(String) and BigDecimal(String) constructors, both quadratic in digit count. Because the digits sit inside a JSON string token rather than a JSON number token, jackson-core's StreamReadConstraints.maxNumberLength guard never applies; jackson's own NumberDeserializers call validateIntegerLength or validateFPLength before parsing a stringified number, but the XML datatype deserializer omits that pre-check. An unauthenticated attacker can therefore submit a single request of a few megabytes, such as a Duration value consisting of the letter P followed by several million digits and the letter Y, and force tens of seconds to several minutes of single-threaded CPU work; a handful of concurrent requests can saturate a server's worker threads. This affects com.fasterxml.jackson.core:jackson-databind from 2.0.0 before 2.18.10, from 2.19.0 before 2.21.6, and from 2.22.0 before 2.22.2, and tools.jackson.core:jackson-databind from 3.0.0 before 3.1.6 and from 3.2.0 before 3.2.2. Users should upgrade to 2.18.10, 2.21.6, 2.22.2, 3.1.6, or 3.2.2.
DefaultBaseTypeLimitingValidator is the PolymorphicTypeValidator applied automatically whenever @JsonTypeInfo is used without an explicitly configured custom validator. It denies polymorphic resolution only for a fixed set of "unsafe base types", and its isSafeSubType method returns true unconditionally for every base type outside that set. java.lang.Comparable was absent from the list despite being implemented by a very large fraction of JDK and application classes, comparable in breadth to java.io.Serializable, which is on the list for that reason. An application declaring an @JsonTypeInfo-annotated property or class with Comparable as its base type, and no custom PolymorphicTypeValidator, will accept a type identifier for essentially any class implementing Comparable. This yields an attacker-controlled object instantiation primitive; a demonstrated case constructs a java.io.File for an arbitrary attacker-chosen path, which becomes path-traversal-adjacent if the application subsequently calls path-sensitive methods on the value. No class implementing Comparable has been identified that yields code execution through deserialization alone. Global Default Typing via activateDefaultTyping is not affected, because that method structurally requires an explicit PolymorphicTypeValidator argument. This affects com.fasterxml.jackson.core:jackson-databind from 2.11.0 before 2.18.10, from 2.19.0 before 2.21.6, and from 2.22.0 before 2.22.2, and tools.jackson.core:jackson-databind from 3.0.0 before 3.1.6 and from 3.2.0 before 3.2.2. Users should upgrade to 2.18.10, 2.21.6, 2.22.2, 3.1.6, or 3.2.2.
jackson-databind's deserializer for java.nio.file.Path resolves an attacker-supplied URI without restricting the URI scheme. In JDKFromStringDeserializer.NioPathHelper.deserialize, a string bound from untrusted JSON is passed to new URI(value) and then to Path.of(uri). When that throws FileSystemNotFoundException, the code enumerates ServiceLoader<FileSystemProvider> and calls provider.getPath(uri) on the first provider whose scheme matches the attacker-chosen scheme. Untrusted JSON can therefore select and drive an arbitrary registered FileSystemProvider during readValue under a default JsonMapper, and forces provider class loading at the same time. With only the JDK built-in providers (file, jar/zipfs) present, the resolved path is inert and no mount or network I/O occurs; further impact requires a side-effecting third-party FileSystemProvider on the classpath. This affects com.fasterxml.jackson.core:jackson-databind from 2.8.0 before 2.18.10, from 2.19.0 before 2.21.6, and from 2.22.0 before 2.22.2, and tools.jackson.core:jackson-databind from 3.0.0 before 3.1.6 and from 3.2.0 before 3.2.2. Users should upgrade to 2.18.10, 2.21.6, 2.22.2, 3.1.6, or 3.2.2. Binding java.nio.file.Path from untrusted JSON should be avoided regardless of version.
PolymorphicTypeValidator bypass via generic type arguments and array element types in jackson-databind allows arbitrary class instantiation (incomplete fix for CVE-2026-54512) [CVE-2026-110879]
A public GitHub Security Advisory (GHSA-m8xf-2cr7-77ph) describes the following issue:
Summary
Jackson checks the outer class in a class-name type ID but accepts attacker-selected classes inside its generic arguments even when they violate the declared type or would be rejected as direct type IDs. This bypasses the generic-argument validation added for CVE-2026-54512. The affected paths include annotation-based class-name polymorphism with a default Jackson 3.x JsonMapper, configured default typing in Jackson 2.x and 3.x, and integrations that expose that default typing.
With class-name default typing and an outer-base rule that permits Map, a property declared as Map<String,String> accepts HashMap<FileSystemXmlApplicationContext,String>. Map-key discovery passes the attacker-controlled JSON property name to the selected class's one-string constructor. With Spring on the classpath and attacker-controlled XML that the application can load, the constructor loads that XML and invokes ProcessBuilder.start() under the application account. Direct selection of the same Spring class is rejected before the XML resource is opened.
Details
DatabindContext.resolveAndValidateGeneric() checks the outer class against the declared base type, then passes each argument from the class-name type ID to validateTypeParameter(). That method validates the argument against the outer base type rather than enforcing its corresponding declared generic binding. It also calls validators with arguments that have not passed the subtype check those validators expect. Under the default DefaultBaseTypeLimitingValidator, this accepts an unrelated class inside a generic subtype even when the same class is rejected as a direct type ID. When an allowIfBaseType(...) rule approves the outer type, Jackson substitutes LaissezFaireSubTypeValidator, so the configured validator no longer restricts the embedded arguments. The element type of a plain array type ID such as Lpkg.Gadget; is likewise not validated once the array's base type is approved, for example under allowIfBaseType(Serializable.class). The relevant code is in [DatabindContext, DefaultBaseTypeLimitingValidator, and StdTypeResolverBuilder.
The default-validator case needs no application-authored validator. With @JsonTypeInfo(use = Id.CLASS) interface Msg, class Env<T> implements Msg containing a public T payload, and a default Jackson 3.x JsonMapper, a direct Gadget type ID for Msg is rejected as "Not a subtype". A type ID naming Env<Gadget> is accepted and deserializes Gadget into payload, including attacker-supplied bean properties. A nested Env<ArrayList<Timer>> type ID creates Timer objects that start live non-daemon threads. The same generic-argument bypass reproduces with Id.MINIMALCLASS on annotated Iterable<String> and Map<String,List<String>> properties, and with allowIfBaseType(Msg.class).
Other affected paths are Jackson 2.x or 3.x default typing with an outer-base rule such as allowIfBaseType(Map.class), and Spring Security's legacy Jackson 2 module whose resolver checks only the raw allowlisted HashMap. A related default-validator control uses a declared Box<?>: Jackson rejects a selected class directly below Object but accepts it inside Box<SelectedClass>. Spring Data Redis 4.0.7's RedisSerializer.json() and the legacy GenericJackson2JsonRedisSerializer() expose the vulnerable default-typing path through public convenience APIs without an application-authored mapper or validator.
The incompatible map-key binding reaches FileSystemXmlApplicationContext's constructor even though the direct type ID is rejected. Stock-JDK demonstrations also create or truncate a file through FileOutputStream(String) and issue a URL request with response retention through the exact-denylisted JEditorPane(String) class.
Executed affected releases include 2.10.0, 2.19.2, 2.22.3, 3.0.0, 3.1.5, and 3.2.3, plus 3.x revision 0505ef4a6ad19ca1ae19328a56dafcca73816ed6. The advertised CVE-2026-54512 fixed releases 2.18.8, 2.21.4, and 3.1.4 also accept the remaining path.
PoC
For the default Jackson 3.x JsonMapper case above, bind JSON to a property of type Msg and compare these type IDs:
- {"msg":{"@class":"pkg.Gadget","cmd":"x"}} is rejected with "Not a subtype". - {"msg":{"@class":"pkg.Env<pkg.Gadget>","payload":{"cmd":"x"}}} is accepted; the Gadget constructor and its attacker-controlled setter run. - {"msg":{"@class":"pkg.Env<java.util.ArrayList<java.util.Timer>>","payload":[{},{},{}]}} is accepted; three Timer values start three non-daemon threads in the reproduced example.
These outcomes, plus the Id.MINIMALCLASS and allowIfBaseType(Msg.class) variants, were reproduced on the unmodified 3.x revision above. A plain Env type ID and a hand-written Env<String> type ID also deserialize on that revision and serve as compatibility controls.
The supplied standalone reproducer runs against unmodified released artifacts. Its default entry point demonstrates JEditorPane URL access and FileOutputStream truncation. Separate entry points exercise a memory-backed Spring XML context, Spring Data Redis, and Spring Security's legacy allowlist. Each Spring entry point verifies that direct selection is rejected without o
[truncated]
Affected: - maven:com.fasterxml.jackson.core:jackson-databind affected >= 2.10.0, <= 2.18.11; fixed unknown - maven:tools.jackson.core:jackson-databind affected >= 3.0.0, <= 3.1.7; fixed unknown - maven:com.fasterxml.jackson.core:jackson-databind affected >= 2.19.0, <= 2.21.7; fixed unknown - maven:com.fasterxml.jackson.core:jackson-databind affected >= 2.22.0, <= 2.22.3; fixed unknown - maven:tools.jackson.core:jackson-databind affected >= 3.2.0, <= 3.2.3; fixed unknown
Fixed versions: see advisory
Advisory: https://github.com/FasterXML/jackson-databind/security/advisories/GHSA-m8xf-2cr7-77ph