Sep 28, 2026·6 min read·28 visits
Incomplete polymorphic type validation in Jackson Databind allows arbitrary object instantiation of Comparable subtypes, exposing applications to file path validation bypasses and class loading attacks.
An incomplete denylist vulnerability in FasterXML jackson-databind's DefaultBaseTypeLimitingValidator allows unauthenticated remote attackers to bypass polymorphic type limitations. By declaring properties of type java.lang.Comparable, attackers can instantiate arbitrary Comparable subclasses on the classpath, leading to path traversal, local file access, or application-specific state manipulation.
The FasterXML jackson-databind library provides robust framework-level capabilities for serializing and deserializing Java objects to and from JSON formats. In many enterprise applications, polymorphism is a core requirement, allowing properties to be defined using abstract classes or interface types. Jackson enables this through annotations such as @JsonTypeInfo, which instruct the deserializer to parse type metadata directly from the incoming payload and resolve it to a concrete subclass.
To prevent arbitrary class loading and the instantiation of malicious payload classes—commonly known as 'gadget' chains—Jackson utilizes a series of validators to control which subtypes can be resolved from abstract base declarations. When developers do not configure a custom class validator, Jackson invokes the DefaultBaseTypeLimitingValidator by default to enforce limits on highly generic, abstract base classes. The objective is to block incoming payloads from invoking types that expose wide, systemic interfaces.
The core of the vulnerability in CVE-2026-83557 lies in the omission of java.lang.Comparable from this default set of unsafe base types. Because Comparable is implemented by an extensive library of classes throughout both the standard Java Development Kit (JDK) and external classpaths, this omission provides an attacker with a robust primitive to trigger arbitrary class instantiation. Unauthenticated remote attackers can leverage this bypass to construct custom payloads that force the application to instantiate unexpected types such as java.io.File.
Polymorphic deserialization operates by mapping JSON fields to concrete Java objects based on class names supplied inside the JSON payload. If an application declares an object property using a wide-reaching interface like java.io.Serializable or java.lang.Object, any class implementing that interface is a candidate for instantiation. To mitigate the risk of attackers instantiating arbitrary classes, Jackson employs a static denylist of unsafe base types within DefaultBaseTypeLimitingValidator.
Historically, this denylist blocked highly abstract classes and interfaces such as java.lang.Object, java.io.Serializable, java.lang.AutoCloseable, and java.lang.Cloneable. However, java.lang.Comparable was omitted from this blocklist. Because countless standard classes—including files, paths, and URI representations—implement Comparable, treating this interface as a safe base type allows attackers to bypass the validator's structural checks.
When a polymorphic field is typed as java.lang.Comparable and serialized without a custom validator, the library processes the class resolution. Since java.lang.Comparable is not evaluated as an unsafe base type, DefaultBaseTypeLimitingValidator.isSafeSubType() accepts the user-supplied subtype class name, as long as that subtype itself is not on a specific blocked list. This architectural omission directly exposes the application to unauthenticated object instantiation.
The vulnerability was resolved by directly patching DefaultBaseTypeLimitingValidator.java to include java.lang.Comparable in the UnsafeBaseTypes list. In the vulnerable versions, the static initializer block of UnsafeBaseTypes declared several core JDK classes as unsafe but left Comparable out. Below is an abstract view of the vulnerability remediation:
// Vulnerable Code: DefaultBaseTypeLimitingValidator.java
private final static class UnsafeBaseTypes {
static {
Set<String> s = new HashSet<>();
s.add(Object.class.getName());
s.add(java.io.Serializable.class.getName());
s.add(AutoCloseable.class.getName());
s.add(Cloneable.class.getName());
// Missing java.lang.Comparable
UNSAFE = s;
}
}To resolve this issue, the maintainers explicitly added Comparable.class.getName() to the UNSAFE set in commit eb3b7fc0f9c0d27f471550ac3316b17d1987388f. The patched implementation prevents polymorphic resolution when the declared field type is a standard Comparable interface:
// Patched Code: DefaultBaseTypeLimitingValidator.java
private final static class UnsafeBaseTypes {
static {
Set<String> s = new HashSet<>();
s.add(Object.class.getName());
s.add(java.io.Serializable.class.getName());
s.add(AutoCloseable.class.getName());
s.add(Cloneable.class.getName());
// [databind#6156]: "Comparable" added as well
s.add(Comparable.class.getName());
UNSAFE = s;
}
}Additionally, the unit tests inside AnnotatedPolymorphicValidationTest.java were expanded to assert that attempts to deserialize payloads targeting Comparable properties will fail by default with an InvalidDefinitionException. Developers who explicitly require polymorphic handling of Comparable must now implement a custom validator subclass and override isUnsafeBaseType() alongside strict validation of safe subtypes within isSafeSubType().
To successfully exploit CVE-2026-83557, the target application must expose a deserialization endpoint that accepts JSON data bound to a Java class containing a property of type java.lang.Comparable (or a subtype), decorated with polymorphic typing annotations like @JsonTypeInfo.
An attacker can craft a payload containing a class identifier such as java.io.File inside the polymorphic type array, followed by the path argument. When the payload is processed, the validator allows the class loading, resulting in the instant creation of the java.io.File object mapping to the attacker's designated target:
{
"value": ["java.io.File", "/etc/passwd"]
}While this instantiation does not immediately execute code on the system, the danger arises from the subsequent lifecycle of the deserialized object. If the application invokes file-related operations, comparisons, or path validation routines on the instantiated Comparable property, the attacker can leverage the primitive to execute path traversal attacks, local file read validations, or state manipulation within the business logic.
The vulnerability carries a CVSS v3.1 base score of 5.6, reflecting a 'Medium' severity profile. The vector breakdown CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L illustrates that while the attack can be launched remotely without privileges, its execution complexity is high because it requires target properties to use highly specific polymorphic typing parameters.
The potential impact is highly contingent on the application's runtime environment and classpath. If the classpath contains complex classes implementing Comparable that execute side effects during construction or setter execution, the security impact could escalate. Furthermore, being able to arbitrarily instantiate classes like java.io.File allows attackers to interact with internal filesystem state depending on how the deserialized object is handled.
From a secure coding perspective, this vulnerability highlights the structural fragility of relying on denylists or blocklists to secure deserialization frameworks. Any omission of wide-ranging classes or interfaces in the library's built-in validation mechanism can expose application endpoints to unexpected behaviors, underlining the necessity of strict allowlisting strategies.
The primary remediation path for CVE-2026-83557 is upgrading jackson-databind to a fully patched version. Organizations utilizing the Jackson 2.x ecosystem must upgrade to 2.18.10, 2.21.6, or 2.22.2 depending on their release line. Organizations transitioning to Jackson 3.x must migrate to 3.1.6 or 3.2.2 to ensure the validator blocks the Comparable base type.
If upgrading the library is not immediately feasible, developers can mitigate the risk by refactoring vulnerable class models. Properties should not be typed with extremely generic interfaces like java.lang.Comparable under polymorphic configurations. Instead, define strict, domain-specific base classes or interfaces to restrict the possible space of candidate subtypes.
Additionally, developers can configure an explicit allowlist-based validation model utilizing BasicPolymorphicTypeValidator. By manually defining which base types and subtypes are permitted to resolve, applications can isolate their deserialization endpoints and insulate themselves against potential omissions in the default library validator.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
com.fasterxml.jackson.core:jackson-databind FasterXML | >= 2.11.0, < 2.18.10 | 2.18.10 |
com.fasterxml.jackson.core:jackson-databind FasterXML | >= 2.19.0, < 2.21.6 | 2.21.6 |
com.fasterxml.jackson.core:jackson-databind FasterXML | >= 2.22.0, < 2.22.2 | 2.22.2 |
tools.jackson.core:jackson-databind FasterXML | >= 3.0.0, < 3.1.6 | 3.1.6 |
tools.jackson.core:jackson-databind FasterXML | >= 3.2.0, < 3.2.2 | 3.2.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-502 / CWE-915 |
| Attack Vector | Network |
| CVSS v3.1 Score | 5.6 (Medium) |
| EPSS Score | 0.00586 (Percentile: 46.72%) |
| Impact | Arbitrary Object Instantiation / Bypass |
| Exploit Status | None |
| KEV Status | Not Listed |
The application deserializes untrusted data without sufficient verification of the resulting object's type, leading to arbitrary object instantiation or execution.
CVE-2026-126192 is an algorithmic complexity vulnerability in Soup Sieve (soupsieve), the default CSS selector engine for Beautiful Soup 4 in Python. Evaluating a CSS selector that contains a general sibling combinator (~) nested inside a :has() relational pseudo-class against attacker-controlled HTML markup triggers O(n^2) quadratic evaluation complexity when the right-hand sibling target is absent. An unauthenticated attacker can supply small HTML documents containing thousands of sibling elements to exhaust CPU resources and stall application worker threads.
CVE-2026-126190 (GHSA-mmhr-3c5m-f64f) is an inefficient algorithmic complexity vulnerability (CWE-407) in Soup Sieve, the default CSS selector library integrated into Beautiful Soup 4. In versions prior to 4.0, evaluating CSS selectors that contain descendant combinators (whitespace between compound selectors) executes an unmemoized upward traversal of the document tree. When evaluated against deeply nested HTML or XML documents, the time complexity scales polynomially at O(n^(k+1)), where n is the tree depth and k is the number of descendant combinators. Remote attackers can supply compact, deeply nested markup (1 KB to 4 KB) to trigger prolonged CPU starvation and denial of service in Python applications.
CVE-2026-122006 is a critical vulnerability in the Ruby on Rails Active Storage framework affecting versions prior to 8.0.5.2 and 8.1.4.1. When an application processes uploaded file attachments using the ImageMagick variant processor (:mini_magick), the framework invokes ImageMagick's metadata analyzer without applying a restrictive security policy. An unauthenticated attacker can upload a crafted file containing directives for unrestricted ImageMagick coders, such as Magick Scripting Language (MSL), resulting in arbitrary server-side file read and write operations. In deployments using the Disk storage service, attackers can exfiltrate sensitive application configuration files, including secret_key_base and master encryption keys, which enables remote code execution via signed payload forgery.
CVE-2026-128065 (also tracked as GHSA-gg5j-6742-v827) is an authorization bypass vulnerability affecting the @grpc/grpc-js-xds library in the Node.js gRPC ecosystem. In versions 1.14.0 and 1.14.1, XdsServer acknowledges Route and VirtualHost resources from an xDS control plane while failing to parse, store, or apply RBACPerRoute override configurations. When experimental RBAC is enabled and a broad top-level ALLOW policy is paired with restrictive VirtualHost or Route overrides, the server evaluates requests strictly against the top-level policy, permitting unauthorized RPC execution.
CVE-2026-126188 (GHSA-3f4q-8x5m-76v8) is an information disclosure vulnerability in the Active Storage component of Ruby on Rails prior to versions 8.0.5.2 and 8.1.4.1. When generating previews or extracting metadata from uploaded media files, Active Storage invokes the external command-line tools ffmpeg and ffprobe without specifying a format whitelist. An attacker who can upload a crafted HTTP Live Streaming (HLS) playlist while declaring a standard video or audio MIME type can cause FFmpeg to engage the HLS demuxer, resolve file:// segment URIs, and disclose visual frames or metadata from local media files readable by the Rails application process.
CVE-2026-126206 (GHSA-jcff-cj73-4w4f) is a Cross-Site Scripting (XSS) vulnerability in version 2.25.2 of the Loofah Ruby gem. The vulnerability stems from an incomplete character reference normalization routine in the `Loofah::HTML5::Scrub.allowed_uri?` method, which fails to decode the HTML5 named character reference `/` (representing the solidus character `/`). Consequently, a crafted `data:` URI such as `data:text/html,<script>alert(1)</script>` bypasses mediatype validation by triggering the WHATWG MIME parser fallback to `text/plain`, while web browsers later resolve `/` to `/` and execute the payload as `text/html`.