NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Maven

CVE-2024-7254: protobuf-java has potential Denial of Service issue

highCVSS 4.0 8.7 · 3.1 7.5GHSA-735f-pc8j-v9w8

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 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…

Published Sep 19, 2024 · Updated Sep 10, 2025

Affected packages

com.google.protobuf:protobuf-java

Ecosystem
Maven
Affected
< 3.25.5
Fixed in
3.25.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-java

com.google.protobuf:protobuf-javalite

Ecosystem
Maven
Affected
< 3.25.5
Fixed in
3.25.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-javalite

com.google.protobuf:protobuf-kotlin

Ecosystem
Maven
Affected
< 3.25.5
Fixed in
3.25.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-kotlin

com.google.protobuf:protobuf-kotlin-lite

Ecosystem
Maven
Affected
< 3.25.5
Fixed in
3.25.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-kotlin-lite

google-protobuf

Ecosystem
RubyGems
Affected
< 3.25.5
Fixed in
3.25.5
Check
bundle info google-protobuf

google-protobuf

Ecosystem
RubyGems
Affected
>= 4.0.0.rc.1, < 4.27.5
Fixed in
4.27.5
Check
bundle info google-protobuf

google-protobuf

Ecosystem
RubyGems
Affected
>= 4.28.0.rc.1, < 4.28.2
Fixed in
4.28.2
Check
bundle info google-protobuf

com.google.protobuf:protobuf-kotlin-lite

Ecosystem
Maven
Affected
>= 4.0.0-RC1, < 4.27.5
Fixed in
4.27.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-kotlin-lite

com.google.protobuf:protobuf-kotlin-lite

Ecosystem
Maven
Affected
>= 4.28.0-RC1, < 4.28.2
Fixed in
4.28.2
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-kotlin-lite

com.google.protobuf:protobuf-kotlin

Ecosystem
Maven
Affected
>= 4.0.0-RC1, < 4.27.5
Fixed in
4.27.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-kotlin

com.google.protobuf:protobuf-kotlin

Ecosystem
Maven
Affected
>= 4.28.0-RC1, < 4.28.2
Fixed in
4.28.2
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-kotlin

com.google.protobuf:protobuf-javalite

Ecosystem
Maven
Affected
>= 4.0.0-RC1, < 4.27.5
Fixed in
4.27.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-javalite

com.google.protobuf:protobuf-javalite

Ecosystem
Maven
Affected
>= 4.28.0-RC1, < 4.28.2
Fixed in
4.28.2
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-javalite

com.google.protobuf:protobuf-java

Ecosystem
Maven
Affected
>= 4.0.0-RC1, < 4.27.5
Fixed in
4.27.5
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-java

com.google.protobuf:protobuf-java

Ecosystem
Maven
Affected
>= 4.28.0-RC1, < 4.28.2
Fixed in
4.28.2
Check
mvn dependency:tree -Dincludes=com.google.protobuf:protobuf-java

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

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)

Credited to anlakii.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology