Update jackson-version [SECURITY]#75
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/jackson-version
branch
3 times, most recently
from
April 1, 2026 17:23
d48fde0 to
9a1bec0
Compare
renovate
Bot
force-pushed
the
renovate/jackson-version
branch
2 times, most recently
from
April 27, 2026 23:07
9a1bec0 to
9f64461
Compare
|
renovate
Bot
force-pushed
the
renovate/jackson-version
branch
from
July 24, 2026 15:38
9f64461 to
ca19297
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.18.0→2.18.92.18.0→2.18.8jackson-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; 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.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 the GitHub Advisory Database (CC-BY 4.0).
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 the GitHub Advisory Database (CC-BY 4.0).
jackson-databind has case-insensitive deserialization bypasses per-property @JsonIgnoreProperties
CVE-2026-54515 / GHSA-5jmj-h7xm-6q6v
More information
Details
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.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
jackson-databind: InetSocketAddress deserialization triggers eager DNS resolution (SSRF)
CVE-2026-54514 / GHSA-hgj6-7826-r7m5
More information
Details
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.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
jackson-databind:
@JsonViewbypass for creator properties with@JsonTypeInfo(include=As.EXTERNAL_PROPERTY)GHSA-mhm7-754m-9p8w
More information
Details
Summary
In
BeanDeserializer.deserializeUsingPropertyBasedWithExternalTypeId, the active-view (@JsonView) filter was applied only to the regular bean-property branch; the creator-property branch performed nocreatorProp.visibleInView(activeView)check. A constructor parameter annotated with both@JsonView(RestrictedView.class)and@JsonTypeInfo(use=Id.NAME, include=As.EXTERNAL_PROPERTY)is populated from attacker JSON even when a more restrictive view is active.This is a patch gap. GHSA-5hh8 (CVE-2026-54517) and GHSA-rcqc (CVE-2026-54518) descriptions cover only the main property-based path and the unwrapped-creator path respectively; the external-type-id creator path was fixed on the 3.x line via #6004 ("Extend #5969/#5971 fixes to ... external-type-id case in regular BeanDeserializer", commit 7dc7a17, 2026-05-22) but
the fix was never backported to 2.21 or 2.18. Users on 2.21.4 and 2.18.8 who upgraded per the published advisories remain vulnerable to the same
@JsonViewbypass technique via a different code path.Vulnerable Code Path
File:
com/fasterxml/jackson/databind/deser/BeanDeserializer.javaMethod:
deserializeUsingPropertyBasedWithExternalTypeIdOn 2.21.4 (and 2.18.8), the creator-property branch (around line 1125-1158) checks
creatorProp.isInjectionOnly()and hands off toext.handlePropertyValue(...)/buffer.assignParameter(...)without ever consultingvisibleInView(activeView):On 3.1.4, the same branch contains the additional guard (commit 7dc7a17):
The 2.21 and 2.18 backport PRs (#6005 and #6003) only backported the main-path fixes from #5969/#5971; the external-type-id fix from #6004 was not backported. The maintainer closed #6005
with "got changes merged forward, looks like it's all covered now", but the forward-merge did not include the ExtTypeId creator branch.
Proof of Concept
Compiles and runs against jackson-databind 2.21.4:
A control case that removes include = As.EXTERNAL_PROPERTY (forcing the normal property-based path) correctly returns asset = null, confirming the bypass is specific to the ExternalTypeId
code path and not a misconfiguration.
Impact
View-restricted (e.g. admin-only) creator properties can be populated from untrusted input where @JsonView is used as a write-side authorization boundary. Typical victims are Spring Boot
REST controllers that use @JsonView(PublicView.class) on the request body to whitelist user-settable fields — an attacker can inject the restricted creator parameter (including choosing
the polymorphic subtype via the sibling kind/type-id property) by combining it with a polymorphic @JsonTypeInfo(EXTERNAL_PROPERTY) annotation on the same field.
Trigger Conditions
Developer code must combine (no opt-in user configuration required):
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
jackson-databind: @JsonIgnore on a Record property is bypassed with a PropertyNamingStrategy
CVE-2026-59888 / GHSA-3pjw-73gf-8qr5
More information
Details
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.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
jackson-databind: @JsonView ypassed for @JsonUnwrapped container properties on deserialization
CVE-2026-59889 / GHSA-5gvw-p9qm-jgwh
More information
Details
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.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
jackson-core: Number Length Constraint Bypass in Async Parser Leads to Potential DoS Condition
GHSA-72hv-8253-57qq
More information
Details
Summary
The non-blocking (async) JSON parser in
jackson-corebypasses themaxNumberLengthconstraint (default: 1000 characters) defined inStreamReadConstraints. This allows an attacker to send JSON with arbitrarily long numbers through the async parser API, leading to excessive memory allocation and potential CPU exhaustion, resulting in a Denial of Service (DoS).The standard synchronous parser correctly enforces this limit, but the async parser fails to do so, creating an inconsistent enforcement policy.
Details
The root cause is that the async parsing path in
NonBlockingUtf8JsonParserBase(and related classes) does not call the methods responsible for number length validation._finishNumberIntegralPart) accumulate digits into theTextBufferwithout any length checks._valueComplete(), which finalizes the token but does not callresetInt()orresetFloat().resetInt()/resetFloat()methods inParserBaseare where thevalidateIntegerLength()andvalidateFPLength()checks are performed.maxNumberLengthconstraint is never enforced in the async code path.PoC
The following JUnit 5 test demonstrates the vulnerability. It shows that the async parser accepts a 5,000-digit number, whereas the limit should be 1,000.
Impact
A malicious actor can send a JSON document with an arbitrarily long number to an application using the async parser (e.g., in a Spring WebFlux or other reactive application). This can cause:
TextBufferto store the number's digits, leading to anOutOfMemoryError.getBigIntegerValue()orgetDecimalValue(), the JVM can be tied up in O(n^2)BigIntegerparsing operations, leading to a CPU-based DoS.Suggested Remediation
The async parsing path should be updated to respect the
maxNumberLengthconstraint. The simplest fix appears to ensure that_valueComplete()or a similar method in the async path calls the appropriate validation methods (resetInt()orresetFloat()) already present inParserBase, mirroring the behavior of the synchronous parsers.NOTE: This research was performed in collaboration with rohan-repos
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
jackson-core: Async parser maxNumberLength bypass via chunked digit accumulation (incomplete fix for GHSA-72hv-8253-57qq)
GHSA-r7wm-3cxj-wff9
More information
Details
Summary
The fix released in jackson-core
2.18.6and2.21.1for GHSA-72hv-8253-57qq (Number Length Constraint Bypass in Async Parser, published 2026-02-28) is incomplete. The fix commitb0c428e6(#1555) wiredvalidateIntegerLengthinto a new_setIntLengthhelper and called it at every place where the integer portion of a number is decided (terminator byte arrived,./e/Eseen, end-of-feed inside a fully-buffered value). It did not call it on the much more attacker-relevant path: "ran out of input while still insideMINOR_NUMBER_INTEGER_DIGITS, returnNOT_AVAILABLEto caller".As a result, an attacker who streams JSON to a non-blocking parser in many small chunks, without ever sending a terminator byte, can keep the parser inside
MINOR_NUMBER_INTEGER_DIGITSindefinitely._textBuffer.expandCurrentSegment()grows on every chunk, andvalidateIntegerLengthis never invoked. The accumulator is only gated bymaxStringLength(20 MiB default) — a ~20,000x amplification of the documentedmaxNumberLength(1000 default).This is the same vulnerability class, same advisory wording ("Memory Exhaustion: Unbounded allocation in TextBuffer from excessively long numbers"), same parser class — just the streaming path the original fix didn't cover. The fix to the fraction path is correct (see
_finishFloatFractionat line 1834-1837 ofNonBlockingUtf8JsonParserBase.javain 2.18.6, where_setFractLength(fractLen)IS called before theNOT_AVAILABLEreturn); the equivalent call is missing from every integer-digit path.Affected versions
Verified on the patched releases:
com.fasterxml.jackson.core:jackson-core2.18.6com.fasterxml.jackson.core:jackson-core2.21.1Structurally identical code in
tools.jackson.core3.0.x / 3.1.x — sameNonBlockingUtf8JsonParserBaseclass, same_setIntLengthrollout, same NOT_AVAILABLE returns without validation. Not retested but presumed vulnerable.Affected code
src/main/java/com/fasterxml/jackson/core/json/async/NonBlockingUtf8JsonParserBase.javain 2.18.6 / 2.21.1.Site 1 —
_startPositiveNumber(int ch)lines 1320-1330:Site 2 —
_finishNumberIntegralPartlines 1691-1727:The pattern recurs at lines 1297, 1329, 1343, 1365, 1395, 1409, 1437, 1467, 1481, 1586, 1644, 1698 — every "ran out of input mid-integer" exit returns to the caller without validating the accumulator length.
Compare with the fraction path that is correct
_finishFloatFractionlines 1827-1838:Impact
Reactive frameworks (Spring WebFlux / Reactor, Quarkus, Helidon, Vert.x JSON, anything wrapping
JsonFactory.createNonBlockingByteArrayParser()orcreateNonBlockingByteBufferParser()) feed inbound HTTP/gRPC bytes to the async parser as they arrive. Operators who setStreamReadConstraints.builder().maxNumberLength(N)on the assumption that this caps memory per number value are not getting that guarantee in chunked-feed scenarios. The parser silently accumulates digits up tomaxStringLength(20 MiB default) per concurrent connection. Multiply by attacker-controlled concurrency to OOM the JVM.The synchronous parsers (
UTF8StreamJsonParser,ReaderBasedJsonParser) and the async parser on complete input are not affected — those paths go through_setIntLengthorParserBase._reportTooLongIntegralcorrectly.CWE-770 (Allocation of Resources Without Limits or Throttling), CVSS roughly the same as the parent advisory (Network / Low complexity / High availability impact). The parent advisory was scored CVSS 8.7 High.
Proof of concept
Standalone PoC, no Maven required:
Observed output against
jackson-core-2.18.6:Observed output against
jackson-core-2.21.1: identical.The 9.83 MB figure is purely a function of the loop bound (600 chunks * 16 KiB). The actual ceiling is
maxStringLength = 20 MiB. With the strict policy declared asmaxNumberLength = 1000, the parser permits 9830x more allocation than the policy allows. WithmaxStringLengthleft at the default 20 MiB, an attacker can drive a single connection to 40 MiB ofchar[]heap (chars are 2 bytes each) before the validator finally fires on terminator/endOfInput(). Multiply by concurrent connections.End-to-end reproduction through real HTTP
Supplements the standalone PoC with a running Spring Boot WebFlux server,
driving the same bug through the actual reactor-netty + Jackson2JsonDecoder
streaming-decode path that production reactive endpoints use.
Setup:
com.fasterxml.jackson.core:jackson-core:2.18.7(latest published)2.18.8-SNAPSHOTbuilt from the fix branchJsonFactoryconfigured withStreamReadConstraints.builder().maxNumberLength(1000).build()Endpoint under test exposes the
Flux<DataBuffer>request body directly toJackson2JsonDecoder.decode(Flux, ResolvableType, ...)so the parser sees oneHTTP chunk per
feedInput(the same pattern used for any@RequestBody Flux<...>/ streaming JSON decoder in WebFlux). A raw-socketHTTP/1.1 chunked client streams
{"v":1then 250 chunks of 200 digit byteseach (50,000 digits total) at 20ms intervals, then writes the closing
}.VULN — jackson-core 2.18.7:
Server-side controller trace (250 DataBuffer arrivals elided):
Server held all 50,000 digit characters in
_textBufferfor 6.5 seconds withmaxNumberLength=1000declared. The validator never fires during streaming;it only fires at value-completion when the closing
}arrives.PATCHED — jackson-core 2.18.8-SNAPSHOT (fix branch):
Server-side controller trace:
Patched server raises
StreamConstraintsExceptionat 155ms after only 5DataBuffers, exactly when the accumulated digit count crosses
maxNumberLength=1000. The connection is reset mid-stream rather than theparser silently consuming the rest of the attacker's payload.
Side-by-side:
Note on the default
@RequestBody Mono<JsonNode>path: that path cannotdistinguish the two builds because Spring's
decodeToMonojoins allDataBuffers into one before parsing. The exploitable shape is the
streaming-decode path (
Flux<JsonNode>/@RequestBody Flux<...>/WebSocket / SSE / any direct
decoder.decode(Flux<DataBuffer>, ...)call),which is also what
Jackson2Tokenizeruses for any streaming JSONdeserialization in WebFlux and Quarkus reactive REST.
Suggested fix
Mirror the pattern already used in
_finishFloatFraction. At every site that returns_updateTokenToNA()(orJsonToken.NOT_AVAILABLE) with_minorState = MINOR_NUMBER_INTEGER_DIGITS, call_setIntLength(outPtr + negMod)first. Concretely, the diff toNonBlockingUtf8JsonParserBase.javawould be:protected JsonToken _finishNumberIntegralPart(char[] outBuf, int outPtr) throws IOException { int negMod = _numberNegative ? -1 : 0; while (true) { if (_inputPtr >= _inputEnd) { _minorState = MINOR_NUMBER_INTEGER_DIGITS; _textBuffer.setCurrentLength(outPtr); + _streamReadConstraints.validateIntegerLength(outPtr + negMod); return _updateTokenToNA(); }Note:
_setIntLengthitself can't be used as-is because it also assigns_intLength, and_intLengthmust not be set until the integer is truly complete (subsequent fraction handling reads_intLength). The minimal fix is to call only the validator, as shown.Apply the same one-line insertion before each
return _updateTokenToNA();that exits with_minorState = MINOR_NUMBER_INTEGER_DIGITS. The sites are listed above (12 lines total).Alternatively, a heavier refactor: also gate
_textBuffer.expandCurrentSegment()calls inside the digit-accumulation loops onoutPtr < maxNumberLengthso that the validator fires at the moment the buffer would be enlarged past the limit, rather than waiting for the next chunk boundary. Either approach is sufficient.Credit
Reported by
tonghuaroot(tonghuaroot@gmail.com). Variant hunt against the Feb 2026 fix for GHSA-72hv-8253-57qq.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.