GHSA-2m67-wjpj-xhg9: Jackson Core Document Length Constraint Bypass Vulnerability
HIGHGHSA-2m67-wjpj-xhg9 is a HIGH (CVSS 7.5) document length constraint bypass vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Jackson Core libraries in the Maven ecosystem. The issue involves document length constraint bypass in blocking, async, and datainput parsers. Remediation is available by upgrading affected packages to version 3.1.1.
GHSA-2m67-wjpj-xhg9 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix GHSA-2m67-wjpj-xhg9
To remediate this vulnerability, upgrade all affected Jackson Core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>3.1.1</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=tools.jackson.core
How to Check if You Are Affected
To determine whether your Java application is affected by GHSA-2m67-wjpj-xhg9, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=tools.jackson.core
Analyze the terminal output to locate any version of Jackson Core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=tools.jackson.core command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Jackson Core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-2m67-wjpj-xhg9 Affected Jackson Core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tools.jackson.core:jackson-core
|
Maven |
≥ 3.0.0
< 3.1.1
|
3.1.1
|
References
Frequently Asked Questions
What is GHSA-2m67-wjpj-xhg9?
Which Jackson Core versions are affected?
What version fixes GHSA-2m67-wjpj-xhg9?
Is jackson-core affected?
What is the CVSS score of GHSA-2m67-wjpj-xhg9?
What CWE is associated with GHSA-2m67-wjpj-xhg9?
How can I check Maven dependencies for GHSA-2m67-wjpj-xhg9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2m67-wjpj-xhg9",
"modified" : "2026-04-08T22:42:15Z",
"published" : "2026-04-04T04:17:07Z",
"aliases" : [ ],
"summary" : "Jackson Core: Document length constraint bypass in blocking, async, and DataInput parsers",
"details" : "## Summary\n\nJackson Core 3.x does not consistently enforce `StreamReadConstraints.maxDocumentLength`. Oversized JSON documents can be accepted without a `StreamConstraintsException` in multiple parser entry points, which allows configured size limits to be bypassed and weakens denial-of-service protections.\n\n## Details\n\nThree code paths where `maxDocumentLength` is not fully enforced:\n\n### 1. Blocking parsers skip validation of the final in-memory buffer\n\nBlocking parsers validate only previously processed buffers, not the final in-memory buffer:\n\n- `ReaderBasedJsonParser.java:255`\n- `UTF8StreamJsonParser.java:208`\n\nRelevant code:\n\n```java\n_currInputProcessed += bufSize;\n_streamReadConstraints.validateDocumentLength(_currInputProcessed);\n```\n\nThis means the check occurs only when a completed buffer is rolled over. If an oversized document is fully contained in the final buffer, parsing can complete without any document-length exception.\n\n### 2. Async parsers skip validation of the final chunk on end-of-input\n\nAsync parsers validate previously processed chunks, but do not validate the final chunk on end-of-input:\n\n- `NonBlockingByteArrayJsonParser.java:49`\n- `NonBlockingByteBufferJsonParser.java:57`\n- `NonBlockingUtf8JsonParserBase.java:75`\n\nRelevant code:\n\n```java\n_currInputProcessed += _origBufferLen;\n_streamReadConstraints.validateDocumentLength(_currInputProcessed);\n\npublic void endOfInput() {\n _endOfInput = true;\n}\n```\n\n`endOfInput()` marks EOF but does not perform a final `validateDocumentLength(...)` call, so an oversized last chunk is accepted.\n\n### 3. DataInput parser path does not enforce `maxDocumentLength` at all\n\n- `JsonFactory.java:457`\n\nRelevant construction path:\n\n```java\nint firstByte = ByteSourceJsonBootstrapper.skipUTF8BOM(input);\nreturn new UTF8DataInputJsonParser(readCtxt, ioCtxt,\n readCtxt.getStreamReadFeatures(_streamReadFeatures),\n readCtxt.getFormatReadFeatures(_formatReadFeatures),\n input, can, firstByte);\n```\n\n`UTF8DataInputJsonParser` does not call `StreamReadConstraints.validateDocumentLength(...)`, so `maxDocumentLength` is effectively disabled for `createParser(..., DataInput)` users.\n\n> **Note:** This issue appears distinct from the recently published nesting-depth and number-length constraint advisories because it affects document-length enforcement.\n\n## PoC\n\n### Async path reproducer\n\n```java\nimport java.nio.charset.StandardCharsets;\nimport tools.jackson.core.JsonParser;\nimport tools.jackson.core.ObjectReadContext;\nimport tools.jackson.core.StreamReadConstraints;\nimport tools.jackson.core.async.ByteArrayFeeder;\nimport tools.jackson.core.json.JsonFactory;\n\npublic class Poc {\n public static void main(String[] args) throws Exception {\n JsonFactory factory = JsonFactory.builder()\n .streamReadConstraints(StreamReadConstraints.builder()\n .maxDocumentLength(10L)\n .build())\n .build();\n\n byte[] doc = \"{\\\"a\\\":1,\\\"b\\\":2}\".getBytes(StandardCharsets.UTF_8);\n\n try (JsonParser p = factory.createNonBlockingByteArrayParser(ObjectReadContext.empty())) {\n ByteArrayFeeder feeder = (ByteArrayFeeder) p.nonBlockingInputFeeder();\n feeder.feedInput(doc, 0, doc.length);\n feeder.endOfInput();\n\n while (p.nextToken() != null) { }\n }\n\n System.out.println(\"Parsed successfully\");\n }\n}\n```\n\n- **Expected result:** Parsing should fail because the configured document-length limit is 10, while the input is longer than 10 bytes.\n- **Actual result:** The document is accepted and parsing completes.\n\n### Blocking path reproducer\n\n```java\nimport java.io.ByteArrayInputStream;\nimport java.nio.charset.StandardCharsets;\nimport tools.jackson.core.JsonParser;\nimport tools.jackson.core.StreamReadConstraints;\nimport tools.jackson.core.json.JsonFactory;\n\npublic class Poc2 {\n public static void main(String[] args) throws Exception {\n JsonFactory factory = JsonFactory.builder()\n .streamReadConstraints(StreamReadConstraints.builder()\n .maxDocumentLength(10L)\n .build())\n .build();\n\n byte[] doc = \"{\\\"a\\\":1,\\\"b\\\":2}\".getBytes(StandardCharsets.UTF_8);\n\n try (JsonParser p = factory.createParser(new ByteArrayInputStream(doc))) {\n while (p.nextToken() != null) { }\n }\n\n System.out.println(\"Parsed successfully\");\n }\n}\n```\n\n## Impact\n\nApplications that rely on `maxDocumentLength` as a safety control for untrusted JSON can accept oversized inputs without error. In network-facing services this weakens an explicit denial-of-service protection and can increase CPU and memory consumption by allowing larger-than-configured request bodies to be processed.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "tools.jackson.core:jackson-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.1.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FasterXML/jackson-core/security/advisories/GHSA-2m67-wjpj-xhg9"
}, {
"type" : "WEB",
"url" : "https://github.com/FasterXML/jackson-core/commit/74c9ee255d1534c179bc7d3de48941bf39a9079c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FasterXML/jackson-core"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-04T04:17:07Z",
"nvd_published_at" : null
}
}