CVE-2022-3171 — Vulnerability in protobuf-javalite — CVE Details
protobuf-java has a potential Denial of Service issue
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.99%). Schedule for your next planned update.
Does your project use an affected com.google.protobuf:protobuf-javalite version?
Paste your pom.xml to check it for CVE-2022-3171 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
A potential Denial of Service issue in protobuf-java core and lite was discovered in the parsing procedure for binary and text format data. Input streams containing multiple instances of non-repeated embedded messages with repeated or unknown fields causes objects to be converted back-n-forth between mutable and immutable forms, resulting in potentially long garbage collection pauses.
Reporter: OSS Fuzz
Affected versions: This issue affects 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-2022-3171 Medium - CVSS Score: 5.7 (NOTE: there may be a delay in publication)
Remediation and Mitigation
Please update to the latest available versions of the following packages:
protobuf-java (3.21.7, 3.20.3, 3.19.6, 3.16.3) protobuf-javalite (3.21.7, 3.20.3, 3.19.6, 3.16.3) protobuf-kotlin (3.21.7, 3.20.3, 3.19.6, 3.16.3) protobuf-kotlin-lite (3.21.7, 3.20.3, 3.19.6, 3.16.3) google-protobuf [JRuby gem only] (3.21.7, 3.20.3, 3.19.6)
Advisory Timeline
- First published October 4, 2022 (1514 days ago).
- Last revised September 10, 2026 — 1436 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-javalite -->
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-kotlin-lite -->
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-kotlin-lite -->
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-javalite -->
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-kotlin -->
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-kotlin-lite -->
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-java -->
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-javalite -->
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-kotlin -->
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-java -->
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-kotlin-lite -->
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-kotlin -->
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-java -->
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-java -->
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-javalite -->
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-kotlin -->
gem install google-protobuf -v 3.19.6
gem install google-protobuf -v 3.20.3
gem install google-protobuf -v 3.21.7
gem install google-protobuf -v 3.16.3
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (20)
Affects 2 ecosystems: Maven (4), RubyGems (1).
| Package | Fixed In |
|---|---|
| com.google.protobuf:protobuf-javalite Maven · Affected: 3.17.0, 3.17.0-rc-1, 3.17.0-rc-2, 3.17.1 (+16 more) | 3.19.6 |
| com.google.protobuf:protobuf-kotlin-lite Maven · Affected: 3.21.0, 3.21.0-rc-1, 3.21.0-rc-2, 3.21.1 (+5 more) | 3.21.7 |
| com.google.protobuf:protobuf-kotlin-lite Maven · Affected: 3.20.0, 3.20.0-rc-1, 3.20.1, 3.20.1-rc-1 (+1 more) | 3.20.3 |
| com.google.protobuf:protobuf-javalite Maven · Affected: 3.21.0, 3.21.0-rc-1, 3.21.0-rc-2, 3.21.1 (+5 more) | 3.21.7 |
| com.google.protobuf:protobuf-kotlin Maven · Affected: 3.20.0, 3.20.0-rc-1, 3.20.1, 3.20.1-rc-1 (+1 more) | 3.20.3 |
| com.google.protobuf:protobuf-kotlin-lite Maven · Affected: All versions | 3.16.3 |
| com.google.protobuf:protobuf-java Maven · Affected: 3.21.0, 3.21.0-rc-1, 3.21.0-rc-2, 3.21.1 (+5 more) | 3.21.7 |
| com.google.protobuf:protobuf-javalite Maven · Affected: 3.20.0, 3.20.0-rc-1, 3.20.1, 3.20.1-rc-1 (+1 more) | 3.20.3 |
| com.google.protobuf:protobuf-kotlin Maven · Affected: 3.21.0, 3.21.0-rc-1, 3.21.0-rc-2, 3.21.1 (+5 more) | 3.21.7 |
| com.google.protobuf:protobuf-java Maven · Affected: 3.17.0, 3.17.0-rc-1, 3.17.0-rc-2, 3.17.1 (+16 more) | 3.19.6 |
| com.google.protobuf:protobuf-kotlin-lite Maven · Affected: 3.17.0, 3.17.0-rc-2, 3.17.1, 3.17.2 (+15 more) | 3.19.6 |
| com.google.protobuf:protobuf-kotlin Maven · Affected: All versions | 3.16.3 |
| com.google.protobuf:protobuf-java Maven · Affected: 2.0.1, 2.0.3, 2.1.0, 2.2.0 (+70 more) | 3.16.3 |
| com.google.protobuf:protobuf-java Maven · Affected: 3.20.0, 3.20.0-rc-1, 3.20.1, 3.20.1-rc-1 (+1 more) | 3.20.3 |
| com.google.protobuf:protobuf-javalite Maven · Affected: 3.10.0, 3.10.0-rc-1, 3.11.0, 3.11.0-rc-1 (+37 more) | 3.16.3 |
| com.google.protobuf:protobuf-kotlin Maven · Affected: 3.17.0, 3.17.0-rc-2, 3.17.1, 3.17.2 (+15 more) | 3.19.6 |
| google-protobuf RubyGems · Affected: 3.17.0, 3.17.0.rc.1, 3.17.0.rc.2, 3.17.1 (+16 more) | 3.19.6 |
| google-protobuf RubyGems · Affected: 3.20.0, 3.20.0.rc.1, 3.20.0.rc.2, 3.20.1 (+2 more) | 3.20.3 |
| google-protobuf RubyGems · Affected: 3.21.0, 3.21.0.rc.1, 3.21.0.rc.2, 3.21.1 (+5 more) | 3.21.7 |
| google-protobuf RubyGems · Affected: 3.0.0, 3.0.0.alpha.1.0, 3.0.0.alpha.1.1, 3.0.0.alpha.2.0 (+70 more) | 3.16.3 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-20Improper Input ValidationMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.7 score means for each attack dimension.
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/protocolbuffers/protobuf/security/advisories/GHSA-h4h5-3hr4-j3g2WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-3171ADVISORY
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48771WEB
- https://github.com/protocolbuffers/protobufPACKAGE
- https://github.com/protocolbuffers/protobuf/releases/tag/v21.7WEB
- https://github.com/protocolbuffers/protobuf/releases/tag/v3.16.3WEB
- https://github.com/protocolbuffers/protobuf/releases/tag/v3.19.6WEB
- https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/google-protobuf/CVE-2022-3171.ymlWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CBAUKJQL6O4TIWYBENORSY5P43TVB4M3WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MPCGUT3T5L6C3IDWUPSUO22QDCGQKTOPWEB
- https://security.gentoo.org/glsa/202301-09WEB
Frequently Asked Questions
- What is CVE-2022-3171?
- protobuf-java has a potential Denial of Service issue. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.7/10).
- How do I check if my project is affected by CVE-2022-3171?
- CVE-2022-3171 affects com.google.protobuf:protobuf-javalite, com.google.protobuf:protobuf-kotlin-lite and com.google.protobuf:protobuf-kotlin (and 2 more). It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-3171 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 61.4% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2024-7254HIGH
protobuf-java has potential Denial of Service issue
- CVE-2015-5237HIGH
protobuf susceptible to buffer overflow
- CVE-2021-22569HIGH
A potential Denial of Service issue in protobuf-java
- CVE-2026-77310MEDIUM
jackson-databind: Incomplete fix for CVE-2026-54514: eager DNS resolution (SSRF) still present in InetAddress deserialization
- CVE-2026-19032MEDIUM
jackson-databind: Path Deserialization Missing Scheme Allowlist for FileSystemProvider Resolution