Cloudanix VulnDB

CVE-2024-7254

High · 7.5

protobuf-java has potential Denial of Service issue

CVSS

7.5

EPSS

2.8%

Published

Sep 19, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A specially crafted data message can crash some Java-based applications that use Protobuf, potentially causing service outages until the software is updated.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Denial Of Service
Component
Library
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw is an availability vulnerability in the Java Protobuf runtime, including full, lite, Kotlin, and JRuby usages that rely on the Java runtime. When an application parses a maliciously crafted Protocol Buffers message containing unknown fields, the parser can recurse until the JVM throws a StackOverflowError. In services that accept untrusted protobuf payloads from APIs, RPC frameworks, queues, files, or inter-service messages, this can crash the processing thread or the entire application process depending on error handling and runtime configuration. The issue does not by itself enable code execution, privilege escalation, or data disclosure; the primary technical impact is denial of service through process crash or repeated worker failure.

Why it matters to the business

Applications that rely on Java-based Protobuf parsing may be remotely crashable if they process attacker-controlled protobuf messages. Business consequences can include service outages, failed message processing, degraded API availability, queue backlogs, restart loops, customer-facing errors, and operational noise from autoscaling or crash recovery. The CVSS score is high for availability impact, but the current EPSS is low and it is not listed in CISA KEV, so remediation should be prioritized for internet-facing services, unauthenticated endpoints, and high-volume message-processing systems rather than treated as evidence of widespread exploitation.

How an attack unfolds

An attacker first identifies an application endpoint, RPC method, message broker topic, file import path, or other interface that accepts Protocol Buffers data and uses the Java Protobuf runtime or a dependent Kotlin/JRuby runtime. The attacker crafts a protobuf message with malformed or deeply nested unknown-field structures that trigger unbounded or excessive recursion during unknown-field parsing. When the vulnerable application deserializes the payload, the parser exhausts the Java thread stack and throws StackOverflowError. If the application does not isolate parsing failures, the request handler, worker, or JVM process may terminate. By repeatedly sending the payload, the attacker can keep the affected service unavailable, cause message-processing retries to fail, or trigger repeated restarts under process supervisors or orchestration platforms.

How to fix it

Upgrade all affected Java Protobuf runtime dependencies, including transitive usages through Kotlin and JRuby Protobuf packages, to a version that contains the upstream fix. For source builds of protocolbuffers/protobuf, ensure the code includes commit cc8b3483a5584b3301e3d43d17eb59704857ffaa or a later release containing that commit. Regenerate dependency lockfiles and rebuild artifacts so patched runtime libraries are actually packaged. Where immediate upgrade is not possible, reduce exposure by rejecting unauthenticated or oversized protobuf payloads, applying strict request size limits, isolating protobuf parsing in recoverable worker boundaries, validating message sources, rate-limiting untrusted clients, and ensuring process supervisors can recover safely without creating retry storms. Mitigations reduce denial-of-service risk but should not be considered a substitute for upgrading the runtime.

How to confirm the fix worked

Confirm exposure by reviewing SBOMs, Maven/Gradle dependency trees, shaded JAR contents, and container images for com.google.protobuf Java runtime artifacts used directly or transitively by Java, Kotlin, or JRuby code. Verify that deployed builds contain a protobuf runtime version or source revision including commit cc8b3483a5584b3301e3d43d17eb59704857ffaa or later. For Maven and Gradle projects, run dependency resolution commands and confirm no vulnerable protobuf-java, protobuf-javalite, protobuf-kotlin, or JRuby-backed protobuf runtime remains in the final artifact. Validate operationally by running regression tests against protobuf parsing paths with malformed unknown-field inputs and confirming the application rejects or handles them without StackOverflowError, process termination, or crash-loop behavior. Also confirm that production images and runtime classpaths do not contain older shaded copies of the Protobuf classes, as application-level dependency updates may not replace embedded copies in third-party JARs.

Typical attack path

  1. Identify a service, API, RPC interface, queue consumer, or import workflow that accepts protobuf-encoded data.
  2. Confirm or infer that the target uses the Java Protobuf full or lite runtime, or Kotlin/JRuby bindings backed by the Java runtime.
  3. Construct a malicious protobuf message containing unknown fields designed to trigger recursive parsing behavior.
  4. Submit the payload to the vulnerable parser through the exposed interface.
  5. Cause the JVM to throw StackOverflowError during deserialization of the unknown fields.
  6. Repeat delivery of the payload to sustain service crashes, worker failures, queue backlog, or degraded availability.

How to detect it

To determine whether this has already been exploited, review application logs, JVM stderr/stdout, centralized logging, APM error traces, container or orchestration events, service supervisor logs, message broker retry/dead-letter records, and API gateway or load balancer telemetry. Look for bursts of StackOverflowError exceptions with stack traces involving com.google.protobuf parsing classes, especially around unknown-field handling, followed by service restarts, pod CrashLoopBackOff events, worker exits, 5xx spikes, or repeated processing of the same inbound message. Correlate timestamps with external request sources, RPC methods, queue message identifiers, partner feeds, or uploaded files that reached protobuf parsing code shortly before the crash. Network indicators are application-specific because protobuf is binary and may be transported over HTTP, gRPC, queues, or files; focus on repeated payload delivery patterns, unusually high failure rates on protobuf endpoints, and malformed-message errors preceding JVM stack exhaustion. Absence of these indicators does not prove non-exploitation, because crashes may be logged only as generic process termination if StackOverflowError is not captured.

  • java.lang.StackOverflowError
  • StackOverflowError
  • com.google.protobuf.UnknownFieldSet
  • com.google.protobuf.UnknownFieldSetLite
  • com.google.protobuf.CodedInputStream
  • com.google.protobuf.CodedInputStreamReader
  • com.google.protobuf.GeneratedMessageV3.parseUnknownField
  • parseUnknownField
  • UnknownFieldSet$Builder.mergeFieldFrom
  • UnknownFieldSetLite.mergeFieldFrom
  • Protocol message contained an invalid tag
  • Protocol message tag had invalid wire type
  • CrashLoopBackOff
  • Back-off restarting failed container

What your security team should do

  • Inventory all applications and services that parse protobuf data, especially internet-facing APIs, gRPC services, queue consumers, file ingestion systems, and partner integration endpoints.
  • Prioritize patching Java, Kotlin, and JRuby applications that accept unauthenticated or externally supplied protobuf messages.
  • Update Protobuf dependencies and source builds to versions containing commit cc8b3483a5584b3301e3d43d17eb59704857ffaa or later, then rebuild and redeploy affected artifacts.
  • Search for shaded or bundled com.google.protobuf classes in application JARs and container images to catch transitive or embedded vulnerable runtimes.
  • Add request size limits, rate limits, authentication requirements, and parsing isolation around protobuf ingestion points where feasible.
  • Review application logs, JVM crash indicators, orchestrator restart events, and message-processing retry failures for StackOverflowError patterns involving com.google.protobuf parsing.
  • Create monitoring for sudden increases in 5xx responses, JVM restarts, pod crash loops, dead-letter queue growth, or repeated parsing failures on protobuf endpoints.
  • Because the vulnerability is not currently in KEV and has low EPSS, manage as a high-impact availability fix with risk-based prioritization rather than as confirmed active exploitation.

The record

When parsing unknown fields in the Protobuf Java Lite and Full library, a maliciously crafted message can cause a StackOverflow error and lead to a program crash. Reporter: Alexis Challande, Trail of Bits Ecosystem Security Team <ecosystem@trailofbits.com> Affected versions: This issue affects all versions of both the Java full and lite Protobuf runtimes, as well as Protobuf for Kotlin and JRuby, which themselves use the Java Protobuf runtime.

Affected packages

Ecosystem Package Introduced Fixed
Maven com.google.protobuf:protobuf-java 0 3.25.5
Maven com.google.protobuf:protobuf-java 4.0.0-RC1 4.27.5
Maven com.google.protobuf:protobuf-java 4.0.0.rc.1 4.27.5
Maven com.google.protobuf:protobuf-java 4.28.0-RC1 4.28.2
Maven com.google.protobuf:protobuf-java 4.28.0.rc.1 4.28.2
Maven com.google.protobuf:protobuf-javalite 0 3.25.5
Maven com.google.protobuf:protobuf-javalite 4.0.0-RC1 4.27.5
Maven com.google.protobuf:protobuf-javalite 4.0.0.rc.1 4.27.5
Maven com.google.protobuf:protobuf-javalite 4.28.0-RC1 4.28.2
Maven com.google.protobuf:protobuf-javalite 4.28.0.rc.1 4.28.2
Maven com.google.protobuf:protobuf-kotlin 0 3.25.5
Maven com.google.protobuf:protobuf-kotlin 4.0.0-RC1 4.27.5
Maven com.google.protobuf:protobuf-kotlin 4.0.0.rc.1 4.27.5
Maven com.google.protobuf:protobuf-kotlin 4.28.0-RC1 4.28.2
Maven com.google.protobuf:protobuf-kotlin 4.28.0.rc.1 4.28.2
Maven com.google.protobuf:protobuf-kotlin-lite 0 3.25.5
Maven com.google.protobuf:protobuf-kotlin-lite 4.0.0-RC1 4.27.5
Maven com.google.protobuf:protobuf-kotlin-lite 4.0.0.rc.1 4.27.5
Maven com.google.protobuf:protobuf-kotlin-lite 4.28.0-RC1 4.28.2
Maven com.google.protobuf:protobuf-kotlin-lite 4.28.0.rc.1 4.28.2
RubyGems google-protobuf 0 3.25.5
RubyGems google-protobuf 4.0.0.rc.1 4.27.5
RubyGems google-protobuf 4.28.0.rc.1 4.28.2
Chainguard apache-nifi 0 2.0.0-r0
Chainguard apache-nifi-compat 0 2.0.0-r0
Chainguard apache-nifi-toolkit 0 2.0.0-r0
Chainguard camunda-zeebe 0 8.6.5-r0
Chainguard camunda-zeebe-8.6 0 8.6.12-r1
Chainguard camunda-zeebe-8.6-compat 0 8.6.12-r1
Chainguard camunda-zeebe-compat 0 8.6.5-r0
Chainguard confluent-kafka 0 8.0.0.6-r0
Chainguard confluent-kafka-jre-bcfips 0 8.0.0.9-r0
Chainguard debezium-connector-spanner-3.3 0 3.3.2-r1
Chainguard druid-compat 0 34.0.0-r6
Chainguard elasticsearch-7 0 7.17.24-r0
Chainguard elasticsearch-7-bitnami 0 7.17.24-r0
Chainguard elasticsearch-7-iamguarded 0 7.17.24-r0
Chainguard elasticsearch-8 0 8.15.3-r0
Chainguard elasticsearch-8-bitnami 0 8.15.3-r0
Chainguard elasticsearch-8-config 0 8.15.3-r0
Chainguard elasticsearch-8-iamguarded 0 8.15.3-r0
Chainguard elasticsearch-config 0 8.15.3-r0
Chainguard elasticsearch-fips-8 0 8.15.3-r0
Chainguard elasticsearch-fips-8-bitnami 0 8.15.3-r0
Chainguard elasticsearch-fips-8-config 0 8.15.3-r0
Chainguard elasticsearch-fips-8-policy-140-2 0 8.15.3-r0
Chainguard elasticsearch-fips-8-policy-140-3 0 8.15.3-r0
Chainguard emsdk 0 5.0.0-r1
Chainguard grpc-java-fips-1.56.0 0 0
Chainguard grpc-java-fips-1.56.0-m2 0 0
Chainguard hadoop-client-modules 0 3.3.6-r8
Chainguard hadoop-thirdparty 0 1.3.0-r0
Chainguard kafka-3.7 0 3.7.1-r1
Chainguard kafka-3.8 0 3.8.1-r0
Chainguard kafka-bitnami-compat-3.7 0 3.7.1-r1
Chainguard kafka-bitnami-compat-3.8 0 3.8.1-r0
Chainguard kafka-jre-bcfips 0 3.8.0-r2
Chainguard knative-kafka-broker-1.17-dispatcher-loom 0 1.17.3-r4
Chainguard knative-kafka-broker-1.17-receiver-loom 0 1.17.3-r4
Chainguard kserve-modelmesh 0 0.12.0-r13
Chainguard kserve-modelmesh 0 0.12.0-r4
Chainguard kserve-modelmesh-compat 0 0.12.0-r13
Chainguard kserve-modelmesh-compat 0 0.12.0-r4
Chainguard kube-fluentd-operator 0 1.18.2-r33
Chainguard kube-fluentd-operator-compat 0 1.18.2-r33
Chainguard kube-fluentd-operator-default-config 0 1.18.2-r33
Chainguard kube-fluentd-operator-oci-entrypoint 0 1.18.2-r33
Chainguard neo4j 0 5.25.1-r0
Chainguard neo4j-oci-entrypoint 0 5.25.1-r0
Chainguard opensearch-2 0 2.18.0-r0
Chainguard opensearch-2-alerting 0 2.18.0-r0
Chainguard opensearch-2-analysis-icu 0 2.18.0-r0
Chainguard opensearch-2-analysis-kuromoji 0 2.18.0-r0
Chainguard opensearch-2-analysis-nori 0 2.18.0-r0
Chainguard opensearch-2-analysis-phonetic 0 2.18.0-r0
Chainguard opensearch-2-analysis-smartcn 0 2.18.0-r0
Chainguard opensearch-2-analysis-stempel 0 2.18.0-r0
Chainguard opensearch-2-analysis-ukrainian 0 2.18.0-r0
Chainguard opensearch-2-anomaly-detection 0 2.18.0-r0
Chainguard opensearch-2-asynchronous-search 0 2.18.0-r0
Chainguard opensearch-2-cross-cluster-replication 0 2.18.0-r0
Chainguard opensearch-2-crypto-kms 0 2.18.0-r0
Chainguard opensearch-2-custom-codecs 0 2.18.0-r0
Chainguard opensearch-2-discovery-azure-classic 0 2.18.0-r0
Chainguard opensearch-2-discovery-ec2 0 2.18.0-r0
Chainguard opensearch-2-discovery-gce 0 2.18.0-r0
Chainguard opensearch-2-entrypoint-compat 0 2.18.0-r0
Chainguard opensearch-2-geospatial 0 2.18.0-r0
Chainguard opensearch-2-identity-shiro 0 2.18.0-r0
Chainguard opensearch-2-index-management 0 2.18.0-r0
Chainguard opensearch-2-ingest-attachment 0 2.18.0-r0
Chainguard opensearch-2-job-scheduler 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-alerting 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-icu 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-kuromoji 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-nori 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-phonetic 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-smartcn 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-stempel 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-analysis-ukrainian 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-anomaly-detection 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-asynchronous-search 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-cross-cluster-replication 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-crypto-kms 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-custom-codecs 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-discovery-azure-classic 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-discovery-ec2 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-discovery-gce 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-geospatial 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-identity-shiro 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-index-management 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-ingest-attachment 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-job-scheduler 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-k-nn 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-mapper-annotated-text 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-mapper-murmur3 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-mapper-size 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-ml-commons 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-neural-search 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-notifications 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-observability 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-performance-analyzer 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-reporting 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-repository-azure 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-repository-gcs 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-repository-s3 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-security 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-security-analytics 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-sql 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-store-smb 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-telemetry-otel 0 2.18.0-r0
Chainguard opensearch-2-jre-bcfips-transport-nio 0 2.18.0-r0
Chainguard opensearch-2-k-nn 0 2.18.0-r0
Chainguard opensearch-2-mapper-annotated-text 0 2.18.0-r0
Chainguard opensearch-2-mapper-murmur3 0 2.18.0-r0
Chainguard opensearch-2-mapper-size 0 2.18.0-r0
Chainguard opensearch-2-ml-commons 0 2.18.0-r0
Chainguard opensearch-2-neural-search 0 2.18.0-r0
Chainguard opensearch-2-notifications 0 2.18.0-r0
Chainguard opensearch-2-observability 0 2.18.0-r0
Chainguard opensearch-2-performance-analyzer 0 2.18.0-r0
Chainguard opensearch-2-reporting 0 2.18.0-r0
Chainguard opensearch-2-repository-azure 0 2.18.0-r0
Chainguard opensearch-2-repository-gcs 0 2.18.0-r0
Chainguard opensearch-2-repository-s3 0 2.18.0-r0
Chainguard opensearch-2-security 0 2.18.0-r0
Chainguard opensearch-2-security-analytics 0 2.18.0-r0
Chainguard opensearch-2-sql 0 2.18.0-r0
Chainguard opensearch-2-store-smb 0 2.18.0-r0
Chainguard opensearch-2-telemetry-otel 0 2.18.0-r0
Chainguard opensearch-2-transport-nio 0 2.18.0-r0
Chainguard ruby3.1-fluentd-kubernetes-daemonset-1.16 0 1.16.6.1.2-r1
Chainguard ruby3.1-fluentd-kubernetes-daemonset-1.16-kinesis 0 1.16.6.1.2-r1
Chainguard ruby3.2-fluentd-kubernetes-daemonset-1.16 0 1.16.6.1.2-r1
Chainguard ruby3.2-fluentd-kubernetes-daemonset-1.16-kinesis 0 1.16.6.1.2-r1
Chainguard ruby3.3-fluentd-kubernetes-daemonset-1.16 0 1.16.6.1.2-r1
Chainguard ruby3.3-fluentd-kubernetes-daemonset-1.16-kinesis 0 1.16.6.1.2-r1
Chainguard ruby3.4-fluentd-kubernetes-daemonset-1.16 0 1.16.6.1.2-r2
Chainguard ruby3.4-fluentd-kubernetes-daemonset-1.16-kinesis 0 1.16.6.1.2-r2
Chainguard sonarqube-10 0 25.1.0.102122-r0
Chainguard sonarqube-10-docker-compat 0 25.1.0.102122-r0
Chainguard sonarqube-10-scripts 0 25.1.0.102122-r0
Chainguard spark-3.5 0 3.5.7-r2
Chainguard spark-3.5-scala-2.12-compat 0 3.5.7-r2
Chainguard spark-3.5-scala-2.12-iamguarded-compat 0 3.5.7-r2
Chainguard spark-3.5-scala-2.13-compat 0 3.5.7-r2
Chainguard spark-fips-3.5 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.12-compat 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.13-compat 0 3.5.4-r17
Chainguard tez 0 0.10.4-r6
Chainguard thingsboard 0 3.9.1-r2
Chainguard thingsboard-tb-js-executor 0 3.9.1-r2
Chainguard thingsboard-tb-mqtt-transport 0 3.9.1-r2
Chainguard thingsboard-tb-node 0 3.9.1-r2
Chainguard thingsboard-tb-web-ui 0 3.9.1-r2
Chainguard trino 0 464-r0
Chainguard trino-config 0 464-r0
Chainguard trino-oci-entrypoint 0 464-r0
Chainguard trino-plugin-accumulo 0 464-r0
Chainguard trino-plugin-ai-functions 0 464-r0
Chainguard trino-plugin-atop 0 464-r0
Chainguard trino-plugin-bigquery 0 464-r0
Chainguard trino-plugin-blackhole 0 464-r0
Chainguard trino-plugin-cassandra 0 464-r0
Chainguard trino-plugin-clickhouse 0 464-r0
Chainguard trino-plugin-delta-lake 0 464-r0
Chainguard trino-plugin-druid 0 464-r0
Chainguard trino-plugin-duckdb 0 464-r0
Chainguard trino-plugin-elasticsearch 0 464-r0
Chainguard trino-plugin-example-http 0 464-r0
Chainguard trino-plugin-exasol 0 464-r0
Chainguard trino-plugin-exchange-filesystem 0 464-r0
Chainguard trino-plugin-exchange-hdfs 0 464-r0
Chainguard trino-plugin-faker 0 464-r0
Chainguard trino-plugin-functions-python 0 464-r0
Chainguard trino-plugin-geospatial 0 464-r0
Chainguard trino-plugin-google-sheets 0 464-r0
Chainguard trino-plugin-hive 0 464-r0
Chainguard trino-plugin-http-event-listener 0 464-r0

Related vulnerabilities