Home/ Blog/ Security news/ Article
Blog · Security news

Java's most-used JSON library has a guardrail attackers can slip dangerous objects past

CVE-2026-54513 lets attackers bypass jackson-databind's polymorphic type validator by wrapping a banned class in an array. Patch to 2.18.8, 2.21.4 or 3.1.4.

Metal sieve in dark space with one capsule slipping through a gap

The defenses you bolt onto a dangerous feature deserve as much scrutiny as the feature itself. That is the real lesson of CVE-2026-54513, a flaw in jackson-databind, the JSON parser that sits underneath most of the Java software your business runs. The bug is not in Jackson's risky feature. It is in the guardrail teams add to make that feature safe.

Jackson can rebuild Java objects directly from incoming JSON, a feature called polymorphic deserialization. Left wide open, it is one of the classic routes to remote code execution: hand the parser the name of a dangerous class that already exists on the application's classpath and it will construct that class for you. To shut that door, Jackson introduced a safeguard in version 2.10 called BasicPolymorphicTypeValidator, an allowlist that declares which classes the parser may build. CVE-2026-54513 is a gap in that allowlist.

What actually broke

The validator offers a builder option named allowIfSubTypeIsArray(). Teams switch it on so that arrays of approved types are accepted, then pair it with an explicit list of the concrete classes they trust. The intent was to permit safe arrays. The behavior was different: it accepted any array purely because it was an array, and never looked at the type of the elements stored inside.

So the allowlist protects a single object but not the objects tucked into an array. An attacker who controls the JSON puts a class you never approved inside an array of that class. Jackson sees an array, the option says arrays are allowed, and it builds the elements with no further validation. The forbidden class is instantiated anyway, which is precisely the gadget-construction risk the validator was built to stop. GitHub scores it 8.1 out of 10 and files it under CWE-184, an incomplete list of disallowed inputs. Security researcher Omkhar Arasaratnam is credited with reporting it.

Are you actually exposed?

You are exposed only if four conditions hold at once: your application turns on Jackson's polymorphic or default typing, you built the validator with the array option, that code path deserializes JSON an attacker can influence, and a usable gadget class sits on your classpath. Miss any one of the four and this specific flaw cannot fire.

Here is the uncomfortable part. The vulnerable code is the defensive code. If you ignored the danger and never set up a validator, this particular flaw does not reach you, though your raw polymorphic-typing exposure is a separate problem worth fixing. The teams who did the responsible thing and added the allowlist are the ones now holding a safeguard with a hole. It is the same severity-versus-reachability split we saw with NGINX: the score tells you to pay attention, your configuration tells you whether it actually bites.

How to find your exposure before you patch

Start in your own code, not in your dependency tree. Search every Java service for allowIfSubTypeIsArray and for the calls that enable polymorphic handling, activateDefaultTyping and the @JsonTypeInfo annotation. A match on the array option next to an explicit allowlist is the exact shape at risk. No matches at all, and you can push this well down the queue.

Then count your versions. jackson-databind is rarely a dependency you picked on purpose. It rides in transitively under Spring, Elasticsearch clients, cloud SDKs and hundreds of other libraries, so one application often pulls several copies at different versions. Your software composition analysis or your software bill of materials is the quickest way to enumerate them. As with other data-binding flaws, the parser turning untrusted input into live objects is where the danger concentrates, and the copy that bites you is usually the transitive one you forgot was there.

Patch first, then test your own guardrails

The fix is a version bump. Jackson's maintainers released the corrected code in early June 2026, and the public advisory followed in mid-June. Upgrade jackson-databind to 2.18.8 on the 2.18 line, 2.21.4 on the 2.19 through 2.21 line, or 3.1.4 on the 3.x line. Anything from 2.10.0 up to those releases carries the flaw, because the validator itself only arrived in 2.10. Since the library is usually transitive, pin or override the version across every service rather than assuming one bump covers them all.

Runtime detection is thin here, which is the nature of deserialization bugs: the malicious input looks like ordinary data until the object is built. Your advantage is in the audit, not the alert. Watch your logs for a spike in deserialization errors or rejected type identifiers, which can signal someone probing the path, and treat the code search above as the primary control.

The broader takeaway outlives this one CVE. A security control is still code, and code has bugs. An allowlist you never tested against a determined input is an assumption, not a defense. The teams who get burned least by the next jackson-databind issue are the ones who write adversarial tests against their own validators, not just against the feature those validators are guarding.

Topics

Frequently asked questions

What is CVE-2026-54513?

CVE-2026-54513 is a high-severity flaw in jackson-databind, the Java JSON library, scored 8.1. Its BasicPolymorphicTypeValidator allowlist, when built with the allowIfSubTypeIsArray option, accepted arrays without checking element types, letting an attacker instantiate a non-allowlisted class by wrapping it in an array. Fixes shipped in 2.18.8, 2.21.4 and 3.1.4.

Which jackson-databind versions are affected?

Versions 2.10.0 up to 2.18.8, 2.19.0 up to 2.21.4, and 3.0.0 up to 3.1.4 are affected. The polymorphic type validator first appeared in 2.10.0, so releases before that do not have the feature or the flaw. Upgrade to 2.18.8, 2.21.4 or 3.1.4.

Am I vulnerable if I use jackson-databind?

Not automatically. Four conditions must all hold: your code enables polymorphic or default typing, the validator is built with allowIfSubTypeIsArray, that path reads attacker-influenced JSON, and a usable gadget class is on your classpath. Applications that never configured the validator are not exposed to this specific bug.

How do I fix CVE-2026-54513?

Upgrade jackson-databind to 2.18.8, 2.21.4 or 3.1.4, depending on your release line. Because the library is usually a transitive dependency, use your SBOM or software composition analysis to find every copy, then pin or override each one to a patched version rather than assuming a single update covers all your services.

Is CVE-2026-54513 being exploited in the wild?

There is no public report of active exploitation as of late June 2026. The score reflects high attack complexity, since exploitation depends on a specific configuration and a gadget class being present. Treat it as an urgent audit-and-patch item rather than an active incident, and watch for that to change.

Ready to meet the Guardians?

Deploys fast - agentless for monitoring and cloud, a lightweight agent for deep endpoint security. Just Suriq, standing watch.