ZeroHour

CVE-2026-68497

mass

Unauthenticated CPU DoS in jackson-databind via quadratic XML datatype parsing

CVSS 3.1
7.5 high
EPSS
Published
()
Modified
AI analysis

CVE-2026-68497 is an unauthenticated denial-of-service flaw in jackson-databind's default deserializers for javax.xml.datatype.Duration and javax.xml.datatype.XMLGregorianCalendar, which pass a JSON string token verbatim to the JDK's DatatypeFactory, whose BigInteger/BigDecimal constructors scale quadratically with digit count. An attacker can trigger it with a single request of a few megabytes — e.g., a Duration string of 'P' followed by millions of digits and 'Y' — because the digits sit inside a JSON string token, bypassing jackson-core's StreamReadConstraints.maxNumberLength guard and the length pre-checks used elsewhere. The attacker gains no code execution or data access, but forces tens of seconds to minutes of single-threaded CPU work per request, and a handful of concurrent requests can exhaust a server's worker threads. Any application using an affected jackson-databind version that binds untrusted JSON input to these XML datatype types is affected, including plain ObjectMapper/JsonMapper instances with default configuration and no polymorphic typing. No public proof-of-concept, in-the-wild exploitation, or KEV listing is currently known.

What to do: Upgrade to jackson-databind 2.18.10, 2.21.6, or 2.22.2 on the 2.x line, or 3.1.6 or 3.2.2 on the 3.x line. In the interim, audit whether your services deserialize untrusted JSON strings into javax.xml.datatype.Duration or XMLGregorianCalendar fields, reject or cap the length of string values for those fields, and apply rate limiting or worker-thread caps on the affected endpoints. Note that jackson-core's StreamReadConstraints number-length limit does not help here because the oversized digits are inside string tokens.

Affected
FasterXML jackson-databind (com.fasterxml.jackson.core:jackson-databind)>=2.0.0, <2.18.10; >=2.19.0, <2.21.6; >=2.22.0, <2.22.2
FasterXML jackson-databind (tools.jackson.core:jackson-databind, 3.x)>=3.0.0, <3.1.6; >=3.2.0, <3.2.2
Estimated exposure
massmillions of deployments (jackson-databind is a de facto default JSON library across the Java ecosystem); the subset exposing Duration/XMLGregorianCalendar… — jackson-databind is bundled by default in an extremely large share of Java applications and frameworks (e.g., Spring Boot), so the library is deployed at the millions-of-installations scale, though only services deserializing untrusted…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

jackson-databind binds a JSON string to a javax.xml.datatype.Duration or javax.xml.datatype.XMLGregorianCalendar field by passing the raw string verbatim to DatatypeFactory.newDuration(value) or newXMLGregorianCalendar(value) in CoreXMLDeserializers.Std._deserialize. These deserializers are registered by default with no opt-in, so a plain ObjectMapper or JsonMapper with no polymorphic typing and no special configuration reaches this path. The XML Schema lexical grammar permits numeric components of arbitrary length, which the JDK materializes through the native BigInteger(String) and BigDecimal(String) constructors, both quadratic in digit count. Because the digits sit inside a JSON string token rather than a JSON number token, jackson-core's StreamReadConstraints.maxNumberLength guard never applies; jackson's own NumberDeserializers call validateIntegerLength or validateFPLength before parsing a stringified number, but the XML datatype deserializer omits that pre-check. An unauthenticated attacker can therefore submit a single request of a few megabytes, such as a Duration value consisting of the letter P followed by several million digits and the letter Y, and force tens of seconds to several minutes of single-threaded CPU work; a handful of concurrent requests can saturate a server's worker threads. This affects com.fasterxml.jackson.core:jackson-databind from 2.0.0 before 2.18.10, from 2.19.0 before 2.21.6, and from 2.22.0 before 2.22.2, and tools.jackson.core:jackson-databind from 3.0.0 before 3.1.6 and from 3.2.0 before 3.2.2. Users should upgrade to 2.18.10, 2.21.6, 2.22.2, 3.1.6, or 3.2.2.

Weakness
CWE-400, CWE-1333
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

In the news

No ingested article mentions this CVE yet.