CVE-2022-3509:
Protobuf Java vulnerable to Uncontrolled Resource Consumption
7.5
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
12/12/2022
Updated
1/28/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
com.google.protobuf:protobuf-java | maven | < 3.16.3 | 3.16.3 |
com.google.protobuf:protobuf-java | maven | >= 3.17.0, < 3.19.6 | 3.19.6 |
com.google.protobuf:protobuf-java | maven | >= 3.20.0, < 3.20.3 | 3.20.3 |
com.google.protobuf:protobuf-java | maven | >= 3.21.0, < 3.21.7 | 3.21.7 |
com.google.protobuf:protobuf-javalite | maven | < 3.16.3 | 3.16.3 |
com.google.protobuf:protobuf-javalite | maven | >= 3.17.0, < 3.19.6 | 3.19.6 |
com.google.protobuf:protobuf-javalite | maven | >= 3.20.0, < 3.20.3 | 3.20.3 |
com.google.protobuf:protobuf-javalite | maven | >= 3.21.0, < 3.21.7 | 3.21.7 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from inefficient handling of message builders during textformat parsing. The commit a3888f5 shows critical changes in BuilderAdapter methods (setField, setRepeatedField, addRepeatedField) where MessageLite.Builder instances were being passed around without being converted to immutable messages via buildPartial(). This caused repeated conversions between mutable/immutable states when processing non-repeated embedded messages with repeated/unknown fields. The patch explicitly converts builders to messages early in these methods, reducing GC pressure by preventing object thrashing.