HIGH 8.1

CVE-2026-54513: Jackson-databind Polymorphic Type Validator Array Bypass

Jackson-databind's BasicPolymorphicTypeValidator has a flaw in how it handles array types during deserialization. When a validator is configured to allow array subtypes using the allowIfSubTypeIsArray() method, it checks only that something is an array—not whether the array's contents (the component type) are actually allowed by the allowlist. This means an application that explicitly allows certain safe classes but denies others can still be tricked into deserializing forbidden types if they're wrapped in an array. The vulnerability affects versions from 2.10.0 through several branches and is resolved in patched versions 2.18.8, 2.21.4, and 3.1.4.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.1 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-184
Affected products
1 configuration(s)
Published / Modified
2026-06-23 / 2026-07-23

NVD description (verbatim)

jackson-databind contains the general-purpose data-binding functionality and tree-model for Jackson Data Processor. From 2.10.0 until 2.18.8, 2.21.4, and 3.1.4, BasicPolymorphicTypeValidator.Builder.allowIfSubTypeIsArray() allowlists any array type based only on clazz.isArray(), without validating the array's component (element) type against the configured allowlist. A PTV built with allowIfSubTypeIsArray() plus an explicit concrete-type allowlist therefore still permits EvilType[] even though EvilType is not allowlisted. When Jackson deserializes the elements and no per-element type IDs are present, it instantiates the component type directly with no further PTV check, bypassing the allowlist. This vulnerability is fixed in 2.18.8, 2.21.4, and 3.1.4.

21 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in jackson-databind's BasicPolymorphicTypeValidator (PTV) implementation. The allowIfSubTypeIsArray() method uses only clazz.isArray() to approve array types without recursively validating the array's component type against the configured allowlist. During deserialization of array elements, when no per-element type ID is embedded in the payload, Jackson instantiates the component type directly, bypassing the PTV check entirely. This permits an attacker to instantiate blacklisted or unvetted types by delivering them as array elements, circumventing the polymorphic type filtering that the validator is intended to enforce.

Business impact

Applications relying on Jackson's polymorphic type validator as a security boundary for untrusted JSON/XML deserialization face object instantiation attacks. An attacker can deserialize malicious objects of restricted types, potentially leading to remote code execution if those types have dangerous constructors or setter methods. This is particularly severe in microservices and API-driven architectures where deserialization of external data is routine. The vulnerability undermines the security model developers rely on when configuring allowlists.

Affected systems

jackson-databind versions 2.10.0 through 2.18.7 (in the 2.18.x line), 2.21.0 through 2.21.3 (in the 2.21.x line), and 3.0.0 through 3.1.3 (in the 3.x line) are affected. Any application that: (1) uses BasicPolymorphicTypeValidator with allowIfSubTypeIsArray(), (2) deserializes untrusted polymorphic data, and (3) relies on the validator's allowlist to prevent instantiation of dangerous types, is vulnerable. Users of other PTV configurations or those not using polymorphic type validation are not affected.

Exploitability

Exploitation requires the application to accept untrusted serialized data (JSON, XML, YAML, etc.) and deserialize it using Jackson with a PTV configured via allowIfSubTypeIsArray(). The attacker supplies malicious objects as array elements within the trusted payload structure. The attack is network-accessible if deserialization occurs on externally-facing endpoints. However, the CVSS score of 8.1 reflects that AC:H (attack complexity high) is a factor—the attacker must understand the application's allowlist and identify gadget chains or dangerous types available on the classpath. No public exploit code is known at this time, and the vulnerability is not yet listed in the CISA KEV catalog.

Remediation

Upgrade to patched versions: jackson-databind 2.18.8, 2.21.4, or 3.1.4 or later, depending on your current line. If immediate patching is not feasible, audit your use of allowIfSubTypeIsArray() and consider restricting deserialization to a narrow set of explicitly required types, or disable polymorphic type handling if possible. Code review should identify all instances where BasicPolymorphicTypeValidator is instantiated and validate that the allowlist configuration matches your security policy.

Patch guidance

1. Identify your current jackson-databind version (check pom.xml, build.gradle, package.json, or equivalent for your ecosystem). 2. If on 2.10.x–2.18.x, update to 2.18.8 or later. If on 2.19.x–2.21.x, update to 2.21.4 or later. If on 3.0.x–3.1.x, update to 3.1.4 or later. 3. Verify against the vendor advisory that the version you select is confirmed patched. 4. Test deserialization pathways, particularly any that use allowIfSubTypeIsArray(), in a staging environment before production deployment. 5. Consider running a security regression test with intentionally malicious array payloads to confirm the fix is active.

Detection guidance

Monitor deserialization errors and type validation logs for sudden spikes in 'type not allowed' or similar rejections, which may indicate attack attempts. Use SAST tools to scan codebases for instantiations of BasicPolymorphicTypeValidator and allowIfSubTypeIsArray() calls; document and review each one. Network detection is difficult without custom signatures, but look for repeated requests to endpoints that accept JSON/XML with arrays of unexpected types. Implement logging that records both the allowlist configuration and the types actually encountered during deserialization to identify bypasses.

Why prioritize this

While not yet in the CISA KEV catalog, this vulnerability deserves immediate attention because: (1) it affects a widely-used library in Java and polyglot environments, (2) it directly bypasses a documented security control (the polymorphic type allowlist), (3) successful exploitation often leads to RCE, and (4) the flaw is subtle and not obvious to code reviewers, increasing the risk that vulnerable configurations exist in production systems. Organizations that practice secure deserialization patterns are at highest risk.

Risk score, explained

The CVSS 3.1 score of 8.1 (HIGH) reflects: Network-accessible vector (AV:N), high impact on confidentiality, integrity, and availability (C:H/I:H/A:H), no user interaction required (UI:N), and unauthenticated access (PR:N/UI:N). The attack complexity is rated High (AC:H) because the attacker must understand the target's allowlist and identify suitable gadget chains. The score does not account for limited real-world prevalence of allowIfSubTypeIsArray() usage, but organizations that do use it face severe risk.

Frequently asked questions

Do I need to patch if I don't use BasicPolymorphicTypeValidator or allowIfSubTypeIsArray()?

No. This vulnerability is specific to the allowIfSubTypeIsArray() method in the PTV builder. If your application uses the default Jackson deserialization or other validation strategies, you are not affected. Review your codebase to confirm.

Can this vulnerability be exploited if my application only deserializes internal or trusted data?

No, exploitation requires the attacker to supply the malicious serialized payload. If your application never deserializes untrusted data (e.g., only internal config files), the risk is negligible. However, many applications underestimate what is 'trusted'—verify carefully.

What is a gadget chain, and why does it matter here?

A gadget chain is a sequence of existing classes on the application classpath whose constructors or methods can be chained to achieve arbitrary code execution when instantiated in a specific order. Even if a dangerous class is unallowlisted, an attacker may instantiate it and trigger its methods indirectly. The high attack complexity rating reflects the difficulty of finding suitable gadget chains, but they often exist in large dependency trees.

If I upgrade to the patched version, do I need to change my code?

Not necessarily. The patch fixes the validator's logic; existing code using allowIfSubTypeIsArray() will work as originally intended (rejecting unallowlisted array component types). However, review the validator's behavior to ensure it aligns with your security model.

This analysis is provided for informational purposes and based on the vulnerability description and CVSS scoring data available as of the publication date. Specific patch version numbers and remediation steps should be verified against the official FasterXML jackson-databind security advisories and release notes before implementation. Organizations should conduct their own risk assessment based on their specific use of Jackson-databind and exposure to untrusted deserialization. This document does not constitute security advice and does not replace professional penetration testing or security auditing. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).