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.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.
CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.
CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.