CVE-2024-7254
JSON

8.7high

Stack overflow in Protocol Buffers Java Lite

Severity
8.7high CVSS:4.0 by Google
Exploit likelihood
2.77% (higher than 86% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Google
Also known as
GHSA-735f-pc8j-v9w8

Description

Any project that parses untrusted Protocol Buffers data containing an arbitrary number of nested groups / series of SGROUP tags can corrupted by exceeding the stack limit i.e. StackOverflow. Parsing nested groups as unknown fields with DiscardUnknownFieldsParser or Java Protobuf Lite parser, or against Protobuf map fields, creates unbounded recursions that can be abused by an attacker.

Affected

Product or packageVersionsReported by
Google Protocol Buffersbefore 28.2CVE List
Google protobuf-javabefore 3.25.5, before 4.27.5, before 4.28.2, from 4.0.0 before 4.27.5, from 4.28.0 before 4.28.2CVE List, NVD
Google protobuf-javalitebefore 3.25.5, before 4.27.5, before 4.28.2, from 4.0.0 before 4.27.5, from 4.28.0 before 4.28.2CVE List, NVD
Google protobuf-kotlinbefore 3.25.5, before 4.27.5, before 4.28.2, from 4.0.0 before 4.27.5, from 4.28.0 before 4.28.2CVE List, NVD
Google protobuf-kotllin-litebefore 3.25.5, before 4.27.5, before 4.28.2CVE List
Google google-protobuf [JRuby Gem]before 3.25.5, before 4.27.5, before 4.28.2CVE List
google protobufbefore 28.2, before 3.25.5, from 4.0.0 before 4.27.5, from 4.28.0 before 4.28.2CVE List, NVD
google protobuf-kotlin-litebefore 3.25.5, from 4.27 before 4.27.5, from 4.28 before 4.28.2, from 4.0.0 before 4.27.5, from 4.28.0 up to 4.28.2CVE List, NVD
com.google.protobuf:protobuf-java (Maven)before 3.25.5, from 4.0.0-RC1 before 4.27.5, from 4.28.0-RC1 before 4.28.2GitHub Advisory Database
com.google.protobuf:protobuf-javalite (Maven)before 3.25.5, from 4.0.0-RC1 before 4.27.5, from 4.28.0-RC1 before 4.28.2GitHub Advisory Database
com.google.protobuf:protobuf-kotlin (Maven)before 3.25.5, from 4.0.0-RC1 before 4.27.5, from 4.28.0-RC1 before 4.28.2GitHub Advisory Database
com.google.protobuf:protobuf-kotlin-lite (Maven)before 3.25.5, from 4.0.0-RC1 before 4.27.5, from 4.28.0-RC1 before 4.28.2GitHub Advisory Database

All scores

Google8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-20CWE-400CWE-674CWE-787

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Any project that parses untrusted Protocol Buffers data containing an arbitrary number of nested groups / series of SGROUP tags can corrupted by exceeding the stack limit i.e. StackOverflow. Parsing nested groups as unknown fields with DiscardUnknownFieldsParser or Java Protobuf Lite parser, or against Protobuf map fields, creates unbounded recursions that can be abused by an attacker.

GitHub Advisory Database
Summary

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.

Severity

CVE-2024-7254 High CVSS4.0 Score 8.7 (NOTE: there may be a delay in publication) This is a potential Denial of Service. Parsing nested groups as unknown fields with DiscardUnknownFieldsParser or Java Protobuf Lite parser, or against Protobuf map fields, creates unbounded recursions that can be abused by an attacker.

Proof of Concept

For reproduction details, please refer to the unit tests (Protobuf Java LiteTest and CodedInputStreamTest) that identify the specific inputs that exercise this parsing weakness.

Remediation and Mitigation

We have been working diligently to address this issue and have released a mitigation that is available now. Please update to the latest available versions of the following packages:

  • protobuf-java (3.25.5, 4.27.5, 4.28.2)
  • protobuf-javalite (3.25.5, 4.27.5, 4.28.2)
  • protobuf-kotlin (3.25.5, 4.27.5, 4.28.2)
  • protobuf-kotlin-lite (3.25.5, 4.27.5, 4.28.2)
  • com-protobuf [JRuby gem only] (3.25.5, 4.27.5, 4.28.2)
NVD (es)

Cualquier proyecto que analice datos de Protocol Buffers no confiables que contengan una cantidad arbitraria de grupos anidados o series de etiquetas SGROUP puede corromperse si se excede el límite de la pila, es decir, StackOverflow. Analizar grupos anidados como campos desconocidos con DiscardUnknownFieldsParser o el analizador Java Protobuf Lite, o contra campos de mapa Protobuf, crea recursiones ilimitadas que pueden ser utilizadas de forma abusiva por un atacante.

References

https://github.com/protocolbuffers/protobuf/commit/cc8b3483a5584b3301e3d43d17eb59704857ffaapatch, web
https://security.netapp.com/advisory/ntap-20241213-0010/third-party-advisory
https://security.netapp.com/advisory/ntap-20250418-0006/third-party-advisory
https://github.com/protocolbuffers/protobuf/security/advisories/GHSA-735f-pc8j-v9w8web
https://nvd.nist.gov/vuln/detail/CVE-2024-7254advisory
https://github.com/protocolbuffers/protobuf/commit/4728531c162f2f9e8c2ca1add713cfee2db6be3bweb
https://github.com/protocolbuffers/protobuf/commit/850fcce9176e2c9070614dab53537760498c926bweb
https://github.com/protocolbuffers/protobuf/commit/9a5f5fe752a20cbac2e722b06949ac985abdd534web
https://github.com/protocolbuffers/protobuf/commit/ac9fb5b4c71b0dd80985b27684e265d1f03abf46web
https://github.com/protocolbuffers/protobuf/commit/d6c82fc55a76481c676f541a255571e8950bb8c3web
https://github.com/protocolbuffers/protobufpackage
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/google-protobuf/CVE-2024-7254.ymlweb

Related

Sources

SourceRecordLicence
CVE ListCVE-2024-7254 changed 2025-09-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-735f-pc8j-v9w8 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-7254 changed 2026-06-17Public domain