CVE-2026-54512: Jackson databind Jackson-databind Has A PolymorphicTypeValidator Bypass Vulnerability
HIGHCVE-2026-54512 is a HIGH (CVSS 8.1) jackson-databind has a polymorphictypevalidator bypass vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Jackson databind libraries in the Maven ecosystem. The issue involves jackson-databind has a polymorphictypevalidator bypass via generic type parameters that allows arbitrary class instantiation. Remediation is available by upgrading affected packages to version 2.18.8, 3.1.4, 2.21.4.
CVE-2026-54512 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-54512
To remediate this vulnerability, upgrade all affected Jackson databind dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.18.8</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.21.4</version>
</dependency>
<dependency>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>3.1.4</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.fasterxml.jackson.core
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-54512, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.fasterxml.jackson.core
Analyze the terminal output to locate any version of Jackson databind in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.18.8), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.fasterxml.jackson.core command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Jackson databind, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-54512 Affected Jackson databind Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.fasterxml.jackson.core:jackson-databind
|
Maven |
≥ 2.10.0
< 2.18.8
|
2.18.8
|
|
com.fasterxml.jackson.core:jackson-databind
|
Maven |
≥ 3.0.0
< 3.1.4
|
3.1.4
|
|
com.fasterxml.jackson.core:jackson-databind
|
Maven |
≥ 2.19.0
< 2.21.4
|
2.21.4
|
|
tools.jackson.core:jackson-databind
|
Maven |
≥ 3.0.0
< 3.1.4
|
3.1.4
|
References
Frequently Asked Questions
What is CVE-2026-54512?
Which Jackson databind versions are affected?
What version fixes CVE-2026-54512?
Is jackson-databind affected?
What is the CVSS score of CVE-2026-54512?
What CWE is associated with CVE-2026-54512?
How can I check Maven dependencies for CVE-2026-54512?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j3rv-43j4-c7qm",
"modified" : "2026-07-20T21:21:12Z",
"published" : "2026-06-23T21:21:38Z",
"aliases" : [ "CVE-2026-54512" ],
"summary" : "jackson-databind has a PolymorphicTypeValidator bypass via generic type parameters that allows arbitrary class instantiation",
"details" : "`jackson-databind`'s `PolymorphicTypeValidator` (PTV) is the primary safety mechanism guarding polymorphic deserialization. When polymorphic typing is enabled and a type identifier contains generic parameters (i.e. the type ID string contains `<`), `DatabindContext._resolveAndValidateGeneric()` validates **only the raw container class name** (the substring before `<`) against the configured PTV.\n\nIf the container type is approved, the method parses the full canonical type string via `TypeFactory.constructFromCanonical()` and returns the fully parameterized type **without ever validating the nested type arguments** against the PTV. The nested type arguments are then resolved, instantiated, and populated as beans during deserialization.\n\nAn attacker who controls the type ID can therefore place a denied class as a generic type parameter of an allowed container — for example `java.util.ArrayList<com.evil.Gadget>` when only `java.util.ArrayList` is allow-listed. The container passes the PTV check; `com.evil.Gadget` is loaded via `Class.forName(name, true, loader)`, instantiated, and its properties are set from attacker-controlled JSON. This completely bypasses an explicitly configured PTV allow-list.\n\nThis is the same vulnerability class responsible for the historical sequence of jackson-databind deserialization CVEs; here it manifests as a validator bypass rather than a missing deny-list entry.\n\n\n## Impact\n\n- **Bypass of the PTV allow-list**, including the recommended `BasicPolymorphicTypeValidator` configured with name-prefix allow rules.\n- **Arbitrary class instantiation** of any type assignable to the container's element/parameter position, with attacker-controlled property values (setter/field injection).\n- **Potential unauthenticated remote code execution** when a class with exploitable side effects (JNDI lookup, JDBC/connection-pool gadgets,`TemplatesImpl`-style loaders, etc.) is present on the classpath.\n\nApplications that accept untrusted JSON and rely on a configured PTV — the documented, security-conscious configuration — are affected.\n\n\n## Proof of Concept\n\nConfiguration restricting polymorphic deserialization to a single safe container:\n\n```java\nBasicPolymorphicTypeValidator ptv = BasicPolymorphicTypeValidator.builder()\n .allowIfSubType(\"java.util.ArrayList\")\n .build();\n\nObjectMapper mapper = JsonMapper.builder()\n .polymorphicTypeValidator(ptv)\n .build();\n```\n\nMalicious payload (`Wrapper.value` is `Object` with `@JsonTypeInfo(use = Id.CLASS, include = As.WRAPPER_ARRAY)`):\n\n```json\n{\"value\":[\"java.util.ArrayList<com.evil.EvilGadget>\",[{\"cmd\":\"calc.exe\"}]]}\n```\n\nOn vulnerable versions, `com.evil.EvilGadget` is instantiated and its `cmd` property is set, despite only `java.util.ArrayList` being allow-listed. On `2.18.8` / `2.21.4` / `3.1.4` the deserialization throws `InvalidTypeIdException` before instantiation.\n\n**Variant payloads** (all bypass an `ArrayList`/`HashMap` allow-list):\n\n| Type ID | Smuggled type position |\n|---|---|\n| `java.util.ArrayList<Evil>` | list element |\n| `java.util.HashMap<Evil,String>` | map key |\n| `java.util.HashMap<String,Evil>` | map value |\n| `java.util.ArrayList<java.util.ArrayList<Evil>>` | nested element |\n| `java.util.ArrayList<Evil[]>` | array element |\n\n---\n\n## Patches\n\nFixed in **2.18.8**, **2.21.4** and **3.1.4** via the changes for [FasterXML/jackson-databind#5988](https://github.com/FasterXML/jackson-databind/issues/5988), commit `434d6c511`. The fix adds recursive validation of each non-trivial type parameter (and array element types appearing as parameters) through the full PTV chain, with documented exemptions for `Object` (wildcard resolution) and `Enum` types.\n\n`PolymorphicTypeValidator` was added in 2.10.0 so vulnerability N/A for versions prior to that.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.fasterxml.jackson.core:jackson-databind"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.10.0"
}, {
"fixed" : "2.18.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.18.7"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.fasterxml.jackson.core:jackson-databind"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.1.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.3"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.fasterxml.jackson.core:jackson-databind"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.19.0"
}, {
"fixed" : "2.21.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.21.3"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "tools.jackson.core:jackson-databind"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.1.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FasterXML/jackson-databind/security/advisories/GHSA-j3rv-43j4-c7qm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54512"
}, {
"type" : "WEB",
"url" : "https://github.com/FasterXML/jackson-databind/issues/5988"
}, {
"type" : "WEB",
"url" : "https://github.com/FasterXML/jackson-databind/commit/434d6c511de7fdd9872f29157aafb6162d12d8d5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FasterXML/jackson-databind"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184", "CWE-502" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-23T21:21:38Z",
"nvd_published_at" : "2026-06-23T21:17:02Z"
}
}