Repository navigation
[CU-86b4umhm1] Update dependency com.fasterxml.jackson.core:jackson-databind to v2.21.7 [SECURITY] - #165
Open
dnastack-renovate[bot] wants to merge 1 commit into
Open
[CU-86b4umhm1] Update dependency com.fasterxml.jackson.core:jackson-databind to v2.21.7 [SECURITY]#165dnastack-renovate[bot] wants to merge 1 commit into
dnastack-renovate[bot] wants to merge 1 commit into
Conversation
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
from
July 1, 2026 02:07
0b1b381 to
614a78b
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
from
July 17, 2026 02:16
614a78b to
d8ae9c5
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
from
August 17, 2026 17:25
d8ae9c5 to
8cb4db9
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
2 times, most recently
from
August 26, 2026 15:10
a8578a3 to
22a7a14
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
3 times, most recently
from
September 22, 2026 15:09
0d552fe to
5e15fbd
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
from
September 28, 2026 23:07
5e15fbd to
b4245b6
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
2 times, most recently
from
September 30, 2026 18:25
4752fd4 to
85d95de
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
2 times, most recently
from
October 3, 2026 22:56
3bb5512 to
67efbd8
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
from
October 4, 2026 01:01
67efbd8 to
eeab5a9
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
from
October 9, 2026 08:10
eeab5a9 to
260b776
Compare
…atabind to v2.21.7 [SECURITY]
dnastack-renovate
Bot
force-pushed
the
renovate/jackson.version
branch
from
October 21, 2026 00:44
260b776 to
3b3b4fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.20.0→2.21.7Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
CVE-2026-54512
jackson-databind'sPolymorphicTypeValidator(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.If 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.An 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 onlyjava.util.ArrayListis allow-listed. The container passes the PTV check;com.evil.Gadgetis loaded viaClass.forName(name, true, loader), instantiated, and its properties are set from attacker-controlled JSON. This completely bypasses an explicitly configured PTV allow-list.This 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.
Impact
BasicPolymorphicTypeValidatorconfigured with name-prefix allow rules.TemplatesImpl-style loaders, etc.) is present on the classpath.Applications that accept untrusted JSON and rely on a configured PTV — the documented, security-conscious configuration — are affected.
Proof of Concept
Configuration restricting polymorphic deserialization to a single safe container:
Malicious payload (
Wrapper.valueisObjectwith@JsonTypeInfo(use = Id.CLASS, include = As.WRAPPER_ARRAY)):{"value":["java.util.ArrayList<com.evil.EvilGadget>",[{"cmd":"calc.exe"}]]}On vulnerable versions,
com.evil.EvilGadgetis instantiated and itscmdproperty is set, despite onlyjava.util.ArrayListbeing allow-listed. On2.18.8/2.21.4/3.1.4the deserialization throwsInvalidTypeIdExceptionbefore instantiation.Variant payloads (all bypass an
ArrayList/HashMapallow-list):java.util.ArrayList<Evil>java.util.HashMap<Evil,String>java.util.HashMap<String,Evil>java.util.ArrayList<java.util.ArrayList<Evil>>java.util.ArrayList<Evil[]>Patches
Fixed in 2.18.8, 2.21.4 and 3.1.4 via the changes for FasterXML/jackson-databind#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 forObject(wildcard resolution) andEnumtypes.PolymorphicTypeValidatorwas added in 2.10.0 so vulnerability N/A for versions prior to that.CVE-2026-54513
Summary
BasicPolymorphicTypeValidator.Builder.allowIfSubTypeIsArray()allowlists any array type based only onclazz.isArray(), without validating the array's component (element) type against the configured allowlist. A PTV built withallowIfSubTypeIsArray()plus an explicit concrete-type allowlist therefore still permitsEvilType[]even thoughEvilTypeis 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.Impact
Applications using
BasicPolymorphicTypeValidatorwithallowIfSubTypeIsArray()as a safeguard get no protection for concrete array component types; an attacker controlling JSON can instantiate non-allowlisted types via an array wrapper, re-opening the gadget-instantiation risk PTV is meant to prevent.Affected / Patched (verified via
git tag --contains)>= 2.10.0, < 2.18.8-> fixed in 2.18.8>= 2.19.0, < 2.21.4-> fixed in 2.21.4>= 3.0.0, < 3.1.4-> fixed in 3.1.4PolymorphicTypeValidatorwas added in 2.10.0 so vulnerability N/A for versions prior to that.Severity / CWE
Maintainer: significant. Reporter: HIGH. CWE-184 (Incomplete List of Disallowed Inputs); related CWE-502.
Upstream fix
FasterXML/jackson-databind#5981; fix PR #5983 (
24529da), 2.18 backport PR #5984 (01d1692). Released 2026-06-04 in 2.18.8 / 2.21.4 / 3.1.4.Credits
Omkhar Arasaratnam (@omkhar) - finder.
CVE-2026-54514
Summary
JDKFromStringDeserializerconstructedInetSocketAddresswithnew InetSocketAddress(host, port), which performs eager DNS name resolution for hostname inputs at deserialization time. An application that binds untrusted JSON into a type containing anInetSocketAddressfield issues an attacker-chosen DNS query duringreadValue, before any application-level validation or connect logic. The fix usesInetSocketAddress.createUnresolved(host, port), deferring DNS to an explicit connect.Impact
An attacker controlling JSON deserialized into an
InetSocketAddress-bearing type can force outbound DNS lookups for attacker-chosen hostnames at deserialization time (SSRF / DNS-based out-of-band interaction / internal-resolver probing), purely from binding.Affected / Patched (verified via
git tag --containson1f5a103)>= 2.18.0, < 2.18.8-> fixed in 2.18.8>= 2.19.0, < 2.21.4-> fixed in 2.21.4>= 3.0.0, < 3.1.4-> fixed in 3.1.4Severity / CWE
Maintainer: minor. Reporter: LOW. CWE-918 (SSRF).
Upstream fix
FasterXML/jackson-databind#5951 ("Improve InetSocketAddress deserialization"). Released 2026-06-04 in 2.18.8 / 2.21.4 / 3.1.4.
Credits
Omkhar Arasaratnam (@omkhar) - finder.
CVE-2026-54515
Summary
In
BeanDeserializerBase.createContextual(), per-property@JsonIgnorePropertiesexclusions are applied by_handleByNameInclusion(), producing acontextualdeserializer whoseBeanPropertyMaphas the ignored properties removed. The subsequent per-property case-insensitivity block (triggered by@JsonFormat(ACCEPT_CASE_INSENSITIVE_PROPERTIES)) rebuilds fromthis._beanProperties(the original, unfiltered map) instead ofcontextual._beanProperties, then overwrites the filtered map — restoring every property_handleByNameInclusionhad just removed. The ignored property becomes writable again.Impact
An application that both enables case-insensitive matching and relies on per-property
@JsonIgnorePropertiesto keep a field unwritable can have that field set from untrusted JSON (mass-assignment-style write).Affected / Patched
Will be fixed in 2.18.9, 2.21.5, 2.22.1 and 3.1.4.
Severity / CWE
Maintainer: minor. Reporter: Moderate. CWE-915.
Upstream fix
FasterXML/jackson-databind#5962 (PR #5964,
0e1b0b2), milestone 3.1.4. Released 2026-06-04.CVE-2026-59888
Summary
For Java Records,
POJOPropertiesCollector._removeUnwantedIgnorals()records a@JsonIgnore-annotated component under its original implicit name before_renameUsing()applies thePropertyNamingStrategy. After the rename,_ignoredPropertyNamesstill holds only the pre-rename name, so_ignorablePropsis built from the stale key. The renamed JSON key passesIgnorePropertiesUtil.shouldIgnore()and is assigned to the Record's constructor parameter, defeating the@JsonIgnore.Impact
A Record using a naming strategy that relies on
@JsonIgnoreto keep an internal/privileged component out of deserialization can have that component set from the wire via its renamed key (e.g. a role/flag controlled by an untrusted client).Affected / Patched (verified via
git tag --contains)>= 2.15.0, < 2.18.8-> fixed in 2.18.8 (backportc7c6783)>= 2.19.0, < 2.21.4-> fixed in 2.21.4>= 3.0.0, < 3.1.4-> fixed in 3.1.4 (#5974,baa2cdf)Severity / CWE
Maintainer: minor. Reporter: Moderate. CWE-915; related CWE-345.
Credits
Omkhar Arasaratnam (@omkhar) - finder.
CVE-2026-77310
Summary
CVE-2026-54514 (GHSA-hgj6-7826-r7m5) fixed an eager-DNS-resolution / SSRF issue in jackson-databind's deserialization of
java.net.InetSocketAddressby switching toInetSocketAddress.createUnresolved(...)(PR #5951, commit 1f5a1037, released in 2.18.8 / 2.21.4 / 3.1.4). That fix did not cover the siblingjava.net.InetAddressbranch in the very sameFromStringDeserializer.Std._deserialize()switch statement, which still callsInetAddress.getByName(value)and therefore performs an eager forward DNS lookup on attacker-controlled input at deserialization time. The fix is incomplete: the same vulnerability class remains reachable throughInetAddress.Details
File: src/main/java/com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.java
Sibling cases in the same switch:
case STD_INET_ADDRESS:
return InetAddress.getByName(value); // eager forward DNS lookup
protected InetSocketAddress _inetSocketAddress(String host, int port) {
// 05-May-2026, tatu: [databind#5951] Prevent DNS lookup:
return InetSocketAddress.createUnresolved(host, port); // no DNS
}
InetAddressis a registered standard string-like scalar type (FromStringDeserializer.types() line 73; findDeserializer() maps it to STD_INET_ADDRESS at line 119-120). Any value deserialized into anInetAddress-typed target — a plain POJO field, a polymorphic subtype, or a default-typing-permitted slot — reachesInetAddress.getByName(attackerControlledString), which invokes the OS/JVM resolver and performs forward DNS resolution before any application validation.The parent fix's own added unit test asserts
address.isUnresolved()with the comment "should NOT resolve address", confirming that performing DNS resolution during deserialization is precisely the behavior being treated as the vulnerability. The InetAddress branch still violates that property.Verified against the FIXED released artifact (jackson-databind 2.18.8, from Maven Central): decompiled bytecode shows the InetSocketAddress branch now routes through
_inetSocketAddress -> createUnresolved, whileInetAddress.getByNameis still emitted unchanged in the InetAddress branch.PoC
Lab-only, zero network egress. Run against the fixed jackson-databind 2.18.8.
A custom JDK InetAddressResolver SPI (Java 18+) counts forward lookups locally and answers with loopback, so no traffic leaves the host:
Observed output (jackson 2.18.8):
[A] InetSocketAddress isUnresolved=true resolverLookups=0 lastHost=null
[B] InetAddress value=localhost/127.0.0.1 resolverLookups=1 lastHost=internal-metadata.attacker-oob.example
A standalone variant (no SPI) using an RFC-6761
.invalidcanary host shows the same: deserializing into InetAddress raises UnknownHostException (the OS resolver was invoked), while InetSocketAddress stays unresolved. Full source in PocResolverCount.java and PocInetAddressIncompleteFix.java.Reachability with a plain field (no annotations, no polymorphism, no default typing):
static class Config { public InetAddress bindHost; public int port; }
mapper.readValue("{"bindHost":"poc-reach.example","port":1}", Config.class);
// -> resolver invoked on "poc-reach.example"
Impact
An attacker who can influence JSON deserialized into an
InetAddresstarget can force the application to perform outbound forward DNS lookups for attacker-chosen hostnames at deserialization time, before any application-level validation. This yields a DNS-based SSRF / OOB primitive: out-of-band exfiltration / interaction via DNS callbacks, and blind probing of whether internal hostnames resolve (internal-host enumeration). This is the same impact class and trust boundary for which CVE-2026-54514 (CVSS 5.3, CWE-918) was assigned to the InetSocketAddress branch. It is a DNS-lookup / blind SSRF primitive, not arbitrary HTTP SSRF or RCE; it does not itself open a socket.Suggested fix: avoid eager resolution for InetAddress as well — e.g. defer resolution, validate the host string before resolving, or provide an opt-in/opt-out consistent with the InetSocketAddress fix (there is no direct unresolved-InetAddress equivalent, so deferring/validating or documenting the resolution is the practical mitigation).
Credit : Ta Duc Thien
CVE-2026-19032
Summary
A
java.nio.file.Pathfield bound from untrusted JSON reachesJDKFromStringDeserializer.NioPathHelper.deserialize. The attacker string flows throughnew URI(value)→Path.of(uri), then onFileSystemNotFoundExceptioninto aServiceLoader<FileSystemProvider>enumeration that callsprovider.getPath(uri)on the first scheme-matching provider. No scheme is rejected, so untrusted JSON can drive an arbitrary registered provider under the defaultJsonMapper.builder().build().Impact is bounded. The JDK built-in providers (
file,jar/zipfs) do no network I/O and do not mount, so the path is inert without a side-effecting third-party provider. BindingPathfrom untrusted input is already an anti-pattern.Description
NioPathHelper.deserializeperforms provider resolution driven by the attacker URI (abridged; the real method also handles a Windows drive-letter prefix and wraps failures viactxt.handleInstantiationProblem(...)):The attacker's scheme selects the provider and the attacker's URI is passed to it; the enumeration also forces provider classloading during
readValue. For built-in schemes likejar:,getPaththrowsFileSystemNotFoundException(a mount requires explicitnewFileSystem), surfacing as a wrappedValueInstantiationExceptionwith no terminal effect. Any mount, network I/O, or resource access depends entirely on the selected provider.Vulnerable Code Location
src/main/java/tools/jackson/databind/deser/jdk/JDKFromStringDeserializer.javaSTD_PATH→NioPathHelper.deserialize;NioPathHelper.deserializebody(
new URI→Path.of(uri)→ServiceLoader.load(FileSystemProvider.class)→provider.getPath(uri)).Proof of Concept
Two PoCs are provided.
PoC 1 — sink reached (built-in
jarprovider).com/poc/Vuln04_PathProvider.java:PoC 2 — scheme-selection mechanism demo (custom
FileSystemProvider).A third-party provider (scheme
evilscheme) registered viaMETA-INF/services/java.nio.file.spi.FileSystemProvider, which is standing in for any provider a real application ships.com/poc/EvilFileSystemProvider.java:Registration descriptor —
src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider:Driver —
com/poc/Vuln04b_PathProviderMount.java:Execution Steps
The PoCs need only the three Jackson 3.2.1 jars on the classpath and can be built with plain
javac/java. PoC 2 additionally requires theMETA-INF/servicesdescriptor to be on the runtime classpathReproduction Evidence
Executed against jackson-databind 3.2.1 (OpenJDK 25).
PoC 1 :
Notes: the JDK built-in
jarprovider'sgetPathdoes not auto-mount (it also throwsFileSystemNotFoundException, since onlynewFileSystemmounts). PoC 1 proves the in-scope defect: attacker input reaches the scheme-drivenServiceLoaderresolution duringreadValuewith no allow-list. PoC 2 only illustrates the downstream mechanism.PoC 2 :
Purely from a JSON string, jackson's
ServiceLoaderfallback selected the attacker-named scheme's provider and invokedprovider.getPath(uri)with the full attacker URI insidereadValue. Whether a given provider then does anything harmful is outside the library's control; the in-scope issue is the absence of a scheme restriction before this fallback runs.Impact
Untrusted JSON drives
provider.getPath(attackerURI)on an attacker-chosen provider duringreadValue. With only the JDK built-in providers this is inert. Real impact requires a side-effecting third-party provider on the classpath. The fix is to close thescheme-restriction gap.
Recommended Fix
jar:and other schemes viactxt.handleWeirdStringValue(...). A hard-coded set keeps the fix backport-safe with no new configuration surface.ServiceLoader<FileSystemProvider>enumeration for disallowed schemes, so untrusted JSON cannot select and drive an arbitrary registered provider.java.nio.file.Path-typed fields should not be bound from untrusted JSON.CVE-2026-68497
Summary
jackson-databind3.2.1 deserializes a JSON string bound to ajavax.xml.datatype.Durationorjavax.xml.datatype.XMLGregorianCalendarfield by passing the raw string verbatim toDatatypeFactory.newDuration(value)/newXMLGregorianCalendar(value). Per the XML-Schema lexical grammar these factory methods accept numeric components of arbitrary length, which the JDK materializes intojava.math.BigInteger/BigDecimalusing the nativeBigInteger(String)constructor (an O(n²) parser). Because the digits reside inside a JSON string token, jackson-core'sStreamReadConstraints.maxNumberLengthguard (which bounds only JSON number tokens) never fires, so there is no length limit anywhere on this path. An unauthenticated attacker can submit a single small request (e.g. ~1–5 MB) that forces tens of seconds to minutes of single-thread CPU consumption, yielding a denial of service under the defaultJsonMapper.builder().build()mapper with no polymorphic typing or special configuration.Details
StreamReadConstraints.maxNumberLength(jackson-core, default 1000) bounds the text length of JSON number tokens only; it does not apply to digits inside a JSON string token (maxStringLengthdefault is 100,000,000). jackson's own value binders compensate for this gap elsewhere —NumberDeserializersexplicitly callstreamReadConstraints().validateIntegerLength(text.length())/validateFPLength(text.length())before parsing a stringified number (NumberDeserializers.java:1063,:1139). The XML-datatype deserializer omits this identical pre-check.CoreXMLDeserializersregistersStddeserializers by default for any field typedjavax.xml.datatype.DurationorXMLGregorianCalendar(findBeanDeserializer), with no opt-in required.Std._deserializehands the attacker string straight to the datatype factory:Per the XSD lexical rules,
newDurationparses each numeric component (years, months, …) into aBigInteger, andnewXMLGregorianCalendarparses fractional seconds into aBigDecimal. The JDK uses the nativeBigInteger(String)/BigDecimal(String)constructors, which are O(n²) in the digit count. A short JSON string such as"P" + "9"×N + "Y"therefore forces the allocation and O(N²) parse of an N-digitBigInteger, entirely downstream of every jackson-core constraint.Vulnerable Code Location
src/main/java/tools/jackson/databind/ext/CoreXMLDeserializers.java:137—
newDuration(value)(TYPE_DURATION)src/main/java/tools/jackson/databind/ext/CoreXMLDeserializers.java:147—
newXMLGregorianCalendar(value)(TYPE_G_CALENDAR fallback)src/main/java/tools/jackson/databind/ext/CoreXMLDeserializers.java:42-46(
findBeanDeserializerreturnsStdforXMLGregorianCalendar/Duration)src/main/java/tools/jackson/databind/deser/jdk/NumberDeserializers.java:1063,1139Proof of Concept
PoC source (
Vuln07_DurationDoS.java). It uses only the publicObjectMapper.readValueAPI and a default mapper; the only "special" element is a normal DTO exposing ajavax.xml.datatype.Durationfield.Minimal HTTP-shaped payload (what an attacker sends):
{ "ttl": "P99999999999999999999…9Y" } // 'P' + N nines + 'Y', N up to ~100,000,000An
XMLGregorianCalendarfield is equally affected via the fractional-seconds path, e.g.{ "at": "0000-01-01T00:00:00." + "9"×N }.Execution Steps
The PoC needs only the three Jackson 3.2.1 jars on the classpath; it can be built and run with plain
javac/java(no Maven required). The jars are the standard published artifacts (here resolved from the local Maven cache~/.m2, but any copy works).The
digitssystem property controls the number of9characters in the year component; JSON payload size ≈ digits + 12 bytes. Increase toward the default 100,000,000maxStringLengthto scale cost further.Environment used for the evidence below: jackson-databind 3.2.1, jackson-core 3.2.1, jackson-annotations 2.22; OpenJDK 25 on macOS (darwin), default
JsonMapper.builder().build().Reproduction Evidence
Deterministic values (payload byte count, resulting bit-length) are exact across runs; timings vary with load. Two independent runs at different sizes:
digits = 5,000,000 (~5 MB payload):
digits = 1,000,000 (~1 MB payload, for fast repeatability):
Interpretation: a normal
"P1Y"value parses in tens of milliseconds; a ~1 MB attacker payload consumes ~11 s and a ~5 MB payload ~293 s of single-thread CPU — a 5–6 order-of-magnitude amplification. The super-linear growth (≈26× cost for 5× payload) is consistent with the JDK's O(n²)BigInteger(String)constructor. The cost occurs insideDatatypeFactory.newDuration, downstream of jackson-core'sStreamReadConstraints(independently confirmed: the same digit sequence supplied as a bare JSON number token is rejected withStreamConstraintsException, whereas inside a string token it is not bounded).Impact
An unauthenticated attacker can stall a request-processing thread for tens of seconds to minutes and allocate a large
BigInteger/BigDecimalfrom a single small request. Because the cost is CPU-bound and super-linear, a handful of concurrent requests can saturate the server's worker threads and CPU, denying service to all users. The exposure requires only that a bound type expose ajavax.xml.datatype.DurationorXMLGregorianCalendarfield common in applications that ingest XML-schema derived data, SOAP/JAXB-adjacent models, or configuration carrying XSD durations — and fires under the default mapper with no polymorphic typing.Recommended Fix
Apply the same validate-length-then-parse idiom the core
NumberDeserializersalready use:CoreXMLDeserializers.Std._deserialize, enforce a maximum raw-string length beforecalling
newDuration(value)/newXMLGregorianCalendar(value)— e.g. reject inputslonger than
ctxt.streamReadConstraints().getMaxNumberLength()(or a dedicated bound),routing over-length input through
ctxt.handleWeirdStringValue(...).of each numeric component before delegating to
DatatypeFactory.Duration/XMLGregorianCalendarfields bound from untrusted input mustbe length-limited at the transport layer.
CVE-2026-83557
Summary
DefaultBaseTypeLimitingValidator— thePolymorphicTypeValidatorused automatically whenever@JsonTypeInfois applied without an explicitly configured custom validator — denies polymorphic resolution only for nine specific "unsafe base types" (Object,Serializable,Closeable,AutoCloseable,Cloneable,Runnable,java.util.logging.Handler,javax.naming.Referenceable,javax.sql.DataSource). ItsisSafeSubType()returnstrueunconditionally for every other base type.java.lang.Comparableis not in that list, despite being implemented by a very large fraction of JDK and application classes — comparable in breadth toSerializable, which is denylisted for exactly that reason. An application with an@JsonTypeInfo-annotatedComparable-typed property, and no custom validator configured, will accept a type identifier for essentially any class implementingComparable.Details
Affected file:
src/main/java/tools/jackson/databind/jsontype/DefaultBaseTypeLimitingValidator.javaThe class's own JavaDoc acknowledges the design ("Note that when using potentially unsafe base type like
java.lang.Objecta custom implementation... is needed"), so the trade-off of leaving broad base types unrestricted is intentional. The gap is thatComparablehas the same breadth of implementers as the types this class does restrict, and its absence looks like an oversight rather than a deliberate choice — consistent with the ongoing, incremental nature of this list (Runnablewas added recently for issue #5014).This is specific to the default, unconfigured validator reached via bare
@JsonTypeInfousage. Global "Default Typing" viaactivateDefaultTyping()is not affected, because that method structurally requires an explicitPolymorphicTypeValidatorargument — a correctly-configuredBasicPolymorphicTypeValidatorrejects the same payload underactivateDefaultTyping().PoC
Built entirely from source (jackson-databind + jackson-core + jackson-annotations,
javac, OpenJDK 21, no third-party gadget libraries, no network access):1. Sanity check (benign class, confirms the mechanism fires):
2. Real JDK class substitution:
3. Negative control — Default Typing with an explicit custom PTV:
Observed output:
$ java -cp .:build/classes PtvGapTest3
Trying: {"value":["java.io.File","/etc/passwd"]}
ACCEPTED, class=java.io.File value=/etc/passwd
$ java -cp .:build/classes PtvGapTest4
Trying malicious substitution: ["PtvGapTest4$Holder",{"value":["java.io.File","/etc/passwd"]}]
REJECTED - InvalidTypeIdException: Could not resolve type id 'java.io.File' as a
subtype of java.lang.Comparable: Configured PolymorphicTypeValidator denied resolution
Impact
Any application declaring an
@JsonTypeInfo-annotated property or class withComparableas its base type, without a separately configured restrictivePolymorphicTypeValidator, will accept a type identifier for essentially any class implementingComparable. Concrete impact is demonstrated viajava.io.File: an attacker can cause construction of aFileobject for an arbitrary, attacker-chosen path. On its own this is a controlled-object-instantiation primitive; if the application later calls path-sensitive or mutating methods on the received value, this becomes a path-traversal-adjacent primitive.Suggested remediation:
java.lang.ComparabletoUnsafeBaseTypes.UNSAFE.java.lang.Iterable,java.util.EventListener) for the same gap.isSafeSubType()for base types outside the fixed denylist, rather than unconditionaltrue.CVE-2026-59889
Summary
UnwrappedPropertyHandler.processUnwrapped()replays the buffered JSON for a@JsonUnwrappedproperty by iterating its properties and callingprop.deserializeAndSet()with noprop.visibleInView(ctxt.getActiveView())guard — the exact guardprocessUnwrappedCreatorProperties()received in the #5971 / GHSA-rcqc-6cw3-h962 fix, and the guardBeanDeserializer.deserializeWithUnwrappedapplies to directly-matched properties. As a result, a property annotated with both@JsonView(PrivilegedView.class)and@JsonUnwrappedis written from attacker JSON even when deserializing under a more-restrictive active view.Correction to the original framing (runtime-verified): the gap is NOT a per-field inner
@JsonView(the unwrapped sub-object's ownBeanDeserializergates inner fields correctly). The unchecked gate is the view of the unwrapped CONTAINER property.Intent proof (runtime, 2.x HEAD 21dd70dd and 3.x HEAD 7a5939d6)
An
@JsonView(AdminView)property that is NOT@JsonUnwrapped→nullunderPublicView(correctly gated). The identical property WITH@JsonUnwrapped→ fully populated (bypass). The fix the creator path already received, not applied to the regular-property method.Impact — write-side mass-assignment / privilege escalation
@JsonViewis commonly used as a write-side authorization guard: a public endpoint binds the body underreaderWithView(PublicView.class)and groups privileged state in a nested object whose container property is@JsonView(AdminView). When that property is@JsonUnwrapped, an untrusted caller mass-assigns it. PoC: a self-service registration whereAccountFlags{role,approved,creditBalance}is@JsonView(AdminView) @​JsonUnwrapped; attacker JSON{role:ADMIN,approved:true,creditBalance:1000000}underPublicViewbinds all three → approved admin with arbitrary balance. The failing gate is a WRITE gate, hence integrity-high (C:N/I:H/A:N); no worse than the C:L/I:L parent and arguably higher as@JsonView-as-write-guard is the exact use case #5971/#5969 defended.Affected
com.fasterxml.jackson.core:jackson-databind2.x: confirmed bypass at 21dd70dd (== released 2.21.4 / 2.22.0 line; includes the #5973 backport).DEFAULT_VIEW_INCLUSIONdefault=true.tools.jackson.core:jackson-databind3.x: confirmed bypass at HEAD 7a5939d6 (latest 3.x).DEFAULT_VIEW_INCLUSIONdefault=false → the stock-config repro is the common shape where privileged inner fields are individually@JsonView(PublicView)and the developer relies on the container@JsonView(AdminView); the 3.x PoC mass-assigns role/approved/creditBalance under PublicView. (The other simultaneous report's PoC was reportedly fixed on 3.x; this distinct container-property path is not.)Additive variants (runtime-confirmed both branches; all closed by the same one-line guard)
@JsonUnwrapped(unwrapped-in-unwrapped) — recursive bypass.readerWithView(...).withValueToUpdate(...)(PATCH/partial-update) — bypass; non-unwrapped merge control gates correctly.@JsonDeserialize(builder=...)) —BuilderBasedDeserializerroutes through the sameprocessUnwrapped.@JsonAnySetter+view and@JsonTypeInfo+@JsonUnwrappedare separate/unsupported behaviors, not this bug.Fix
Add
prop.visibleInView(ctxt.getActiveView())(whenMapperFeature.DEFAULT_VIEW_INCLUSION/active-view applies) to theprocessUnwrapped()property loop, mirroringprocessUnwrappedCreatorProperties(). One change closes the impact PoC + all three variants acrossBeanDeserializerandBuilderBasedDeserializer. Full runnable PoCs (2.x + 3.x) + variant harnesses available on request.jackson-databind has an array subtype allowlist bypass in BasicPolymorphicTypeValidator (allowIfSubTypeIsArray)
CVE-2026-54513 / GHSA-rmj7-2vxq-3g9f
More information
Details
Summary
BasicPolymorphicTypeValidator.Builder.allowIfSubTypeIsArray()allowlists any array type based only onclazz.isArray(), without validating the array's component (element) type against the configured allowlist. A PTV built withallowIfSubTypeIsArray()plus an explicit concrete-type allowlist therefore still permitsEvilType[]even thoughEvilTypeis 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.Impact
Applications using
BasicPolymorphicTypeValidatorwithallowIfSubTypeIsArray()as a safeguard get no protection for concrete array component types; an attacker controlling JSON can instantiate non-allowlisted types via an array wrapper, re-opening the gadget-instantiation risk PTV is meant to prevent.Affected / Patched (verified via
git tag --contains)>= 2.10.0, < 2.18.8-> fixed in 2.18.8>= 2.19.0, < 2.21.4-> fixed in 2.21.4>= 3.0.0, < 3.1.4-> fixed in 3.1.4PolymorphicTypeValidatorwas added in 2.10.0 so vulnerability N/A for versions prior to that.Severity / CWE
Maintainer: significant. Reporter: HIGH. CWE-184 (Incomplete List of Disallowed Inputs); related CWE-502.
Upstream fix
FasterXML/jackson-databind#5981; fix PR #5983 (
24529da), 2.18 backport PR #5984 (01d1692). Released 2026-06-04 in 2.18.8 / 2.21.4 / 3.1.4.Credits
Omkhar Arasaratnam (@omkhar) - finder.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
jackson-databind has a PolymorphicTypeValidator bypass via generic type parameters that allows arbitrary class instantiation
CVE-2026-54512 / GHSA-j3rv-43j4-c7qm
More information
Details
jackson-databind'sPolymorphicTypeValidator(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.If 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.An 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 onlyjava.util.ArrayListis allow-listed. The container passes the PTV check;com.evil.Gadgetis loaded viaClass.forName(name, true, loader), instantiated, and its properties are set from attacker-controlled JSON. This completely bypasses an explicitly configured PTV allow-list.This is the same vulnerability class responsible for the historical sequence of jackson-databind deserialization CVEs; he