Overview
About vulnerability
Summary
When an @JsonIdentityInfo collection or map first creates N unresolved
object-ID references and later resolves the same IDs in reverse order,
jackson-databind scans the remaining pending-reference accumulator for each
resolution. A shallow JSON document whose size grows linearly can therefore
cause quadratic CPU work during deserialization.
Details
The affected path is forward-reference completion in
CollectionDeserializer.CollectionReferringAccumulator.resolveForwardReference()
and the corresponding map implementation. The implementation performs a
linear search of the pending accumulator for every resolved object ID.
The behavior is runtime-confirmed in jackson-databind 2.5.0, 2.22.1, and 3.2.1. Current 2.22 and 3.2 source branches retained the same design when rechecked. A 2.4.0 control fails closed before successful reverse-order completion, so 2.5.0 is the conservative runtime-confirmed affected floor. The patched versions are: 2.18.11, 2.21.7, 2.22.3, 3.1.7 and 3.2.3.
The vulnerable application must deserialize attacker-influenced JSON into an identity-enabled collection or map. The issue does not require deep nesting or syntactically unusual JSON.
Suggested correction: replace repeated linear lookup/removal with a keyed pending-reference structure or another design that provides linear or amortized-linear completion. A regression should preserve input order, duplicate-ID behavior, and unresolved-ID errors while bounding reverse-order resolution work.
PoC
The proof constructs a shallow collection containing N unresolved
@JsonIdentityInfo references followed by definitions of those same IDs in
reverse order. Its ID class counts equals() calls, giving a deterministic
work measure rather than a timing-dependent result.
With N=2,000, affected versions perform exactly 2,003,000 ID comparisons. An
equally sized control in which every reference is already resolved performs
zero comparisons in the pending-reference lookup path. The run is bounded to
a 512 MiB JVM. The result demonstrates quadratic growth: approximately
N * (N + 1) / 2 comparisons, plus fixed setup comparisons.
Impact
An unauthenticated source that can submit JSON to an application using the affected identity-enabled collection or map shape can consume quadratic CPU and exhaust a request-time or worker-capacity budget, causing denial of service. The application model/configuration prerequisite is material. No confidentiality, integrity, code-execution, or parser-depth impact is claimed.
Requested credit: Daniel Birtwhistle
Details
- Affected product:
- AlmaLinux 9.2 ESU , Apache CXF , Apache Hadoop , Apache Hive , Apache Kafka , Apache Log4j , Apache Maven , Apache Solr , Apache Spark , Apache Struts , Eclipse Jersey , Eclipse Jetty , Elasticsearch , Hazelcast , Hibernate , Jackson , OpenSearch , Spring , TuxCare 9.6 ESU , TuxCare 9.8 ESU , Wildfly , accumulo , activemq , agepredictor , airlift , alluxio , amazon-kinesis-client , amazon-kinesis-producer , apicurio-common-rest-client , apicurio-registry , apicurio-registry-operator , archaius , ardielle-java , arrow , artemis , athenz , avro , aws-glue-schema-registry , aws-sdk-java , aws-sdk-java-v2 , aws-secretsmanager-caching-java , aws-secretsmanager-jdbc , aws-xray-sdk-java , azure-cosmosdb-java , azure-kusto-java , azure-sdk-for-java , azure-search-documents , azure-spring-data-cosmos , bmc-oke-workload-identity , bookkeeper , bytebuffer-collections , calcite , camel , canal , carrot2 , cassandra-java-driver , client_java , com.amazonaws:aws-java-sdk-chimesdkmediapipelines , com.amazonaws:aws-java-sdk-drs , com.amazonaws:aws-java-sdk-migrationhubrefactorspaces , com.azure:azure-core-amqp , com.azure:azure-core-serializer-json-jackson , com.github.jsonld-java:jsonld-java , com.wavefront:wavefront-sdk-java , consul-client , corda , cos-java-sdk-v5 , cos-java-sdk-v5-bundle , couchbase-jvm-clients , couchbase-jvm-clients-core-io , couchbase-jvm-clients-java-client , curator , debezium , deeplearning4j , discovery , docker-java , docx4j , docx4j-ImportXHTML , docx4j-export-FO , droolsjbpm-integration , druid , dynamodb-streams-kinesis-adapter , emitter , etcd4j , eureka , fabric8 , flink , flume , geode , geode-lucene , geoip2 , glassfish , glassfish-hk2 , grails-async , grails-core , grails-data-mapping , grails-gsp , grails-plugin-converters , graphql-java-servlet , groovy , hbase , hbase-thirdparty , http-client , huaweicloud-sdk-java-obs , hystrix , ignite , incubator-retired-htrace , incubator-retired-slider , infinispan , io.airlift:jmx , io.airlift:jmx-http , io.apicurio:apicurio-common-rest-client-jdk , jaeger-client-java , jasperreports , java-apns , java-cas-client , java-couchbase-encryption , java-driver , java-genai , java-jwt , java-opensaml , java-sdk , java-util , jena , jersey , jgroups-aws , jjwt , jolt , json-flattener , json-patch , json-schema-core , json-schema-validator , json4s , jsonpath , jsonschema-generator , jsonschema2pojo , jwks-rsa-java , karaf , kinesis-logback-appender , kite , kubernetes-client , logging-flume , logging-flume-irc , maxmind-db-reader-java , maxminddb , mbknor-jackson-jsonschema , mcp-annotations , metrics , micrometer , micrometer-tracing , micronaut-cache , micronaut-core , micronaut-spring , microsoft-authentication-library-for-java , mockwebserver , mustache.java , nd4j , neo4j-java-driver , neo4j-ogm , oci-java-sdk , olingo-odata4 , openai-java , opencensus-java , openstack4j , orc , org.apache.groovy:groovy-all , org.apache.jena:jena-tdb , org.apache.parquet:parquet-cli , org.kitesdk:kite-data-hbase , org.ops4j.pax.exam , org.tachyonproject:tachyon-client , parquet-java , pinecone-java-client , pravega , protostream , pulsar , pulsar-client-reactive , quarkus , redisson , remoting-jmx , rescu , rest-assured , resteasy , resteasy-spring , retrofit , ribbon , scribejava , server-metrics , signalfx-java , simulacron , smallrye-mutiny-vertx-bindings , smallrye-open-api , socketlabs-java , spectator , strimzi-kafka-operator , swagger-core , swagger-parser , testcontainers-java , tika , tinkerpop , trendrrnsqclient , trino , twilio-java , typesense-java , vert.x , vertx-auth , vertx-kafka-client , vertx-web , wavefront-internal-reporter-java , web3j , web3j-quorum , wiremock , ws-wss4j , xchange , ycsb , zendesk-java-client , zjsonpatch , zookeeper
- Affected packages:
- avatica-core @ 1.10.0 (+27796 more)