Update dependency com.fasterxml.jackson.core:jackson-core to v2.18.8 [SECURITY]#32
Open
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/maven-com.fasterxml.jackson.core-jackson-core-vulnerability
branch
from
June 27, 2025 20:53
6c67236 to
8c57f0f
Compare
renovate
Bot
force-pushed
the
renovate/maven-com.fasterxml.jackson.core-jackson-core-vulnerability
branch
from
March 2, 2026 02:43
8c57f0f to
ec97e0a
Compare
renovate
Bot
deleted the
renovate/maven-com.fasterxml.jackson.core-jackson-core-vulnerability
branch
March 27, 2026 02:46
renovate
Bot
force-pushed
the
renovate/maven-com.fasterxml.jackson.core-jackson-core-vulnerability
branch
2 times, most recently
from
March 27, 2026 15:54
ec97e0a to
8ca683f
Compare
renovate
Bot
force-pushed
the
renovate/maven-com.fasterxml.jackson.core-jackson-core-vulnerability
branch
2 times, most recently
from
April 27, 2026 20:12
8ca683f to
8c7cb9d
Compare
renovate
Bot
force-pushed
the
renovate/maven-com.fasterxml.jackson.core-jackson-core-vulnerability
branch
from
July 24, 2026 13:00
8c7cb9d to
451e477
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.11.1→2.18.8Jackson-core Vulnerable to Memory Disclosure via Source Snippet in JsonLocation
CVE-2025-49128 / GHSA-wf8f-6423-gfxg
More information
Details
Overview
A flaw in Jackson-core's
JsonLocation._appendSourceDescmethod allows up to 500 bytes of unintended memory content to be included in exception messages. When parsing JSON from a byte array with an offset and length, the exception message incorrectly reads from the beginning of the array instead of the logical payload start. This results in possible information disclosure in systems using pooled or reused buffers, like Netty or Vert.x.Details
The vulnerability affects the creation of exception messages like:
When
JsonFactory.createParser(byte[] data, int offset, int len)is used, and an error occurs while parsing, the exception message should include a snippet from the specified logical payload. However, the method_appendSourceDescignores theoffset, and always starts reading from index0.If the buffer contains residual sensitive data from a previous request, such as credentials or document contents, that data may be exposed if the exception is propagated to the client.
The issue particularly impacts server applications using:
INCLUDE_SOURCE_IN_LOCATIONis enabled)A documented real-world example is CVE-2021-22145 in Elasticsearch, which stemmed from the same root cause.
Attack Scenario
An attacker sends malformed JSON to a service using Jackson and pooled byte buffers (e.g., Netty-based HTTP servers). If the server reuses a buffer and includes the parser’s exception in its HTTP 400 response, the attacker may receive residual data from previous requests.
Proof of Concept
Patches
This issue was silently fixed in jackson-core version 2.13.0, released on September 30, 2021, via PR #652.
All users should upgrade to version 2.13.0 or later.
Workarounds
If upgrading is not immediately possible, applications can mitigate the issue by:
Disabling exception message exposure to clients — avoid returning parsing exception messages in HTTP responses.
Disabling source inclusion in exceptions by setting:
This prevents Jackson from embedding any source content in exception messages, avoiding leakage.
References
Severity
CVSS:3.1/AV:L/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-core can throw a StackoverflowError when processing deeply nested data
CVE-2025-52999 / GHSA-h46c-h94j-95f3
More information
Details
Impact
With older versions of jackson-core, if you parse an input file and it has deeply nested data, Jackson could end up throwing a StackoverflowError if the depth is particularly large.
Patches
jackson-core 2.15.0 contains a configurable limit for how deep Jackson will traverse in an input document, defaulting to an allowable depth of 1000. Change is in https://github.com/FasterXML/jackson-core/pull/943. jackson-core will throw a StreamConstraintsException if the limit is reached.
jackson-databind also benefits from this change because it uses jackson-core to parse JSON inputs.
Workarounds
Users should avoid parsing input files from untrusted sources.
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).
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([email protected]). 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.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.