Skip to main content

CVE-2022-3171 — Vulnerability in protobuf-javalite — CVE Details

MEDIUM

protobuf-java has a potential Denial of Service issue

Published October 4, 2022Updated September 10, 2026Source: OSV

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.

Check my pom.xml

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.

Maven
Update com.google.protobuf:protobuf-javalite to 3.19.6 or later
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-javalite -->
Maven
Update com.google.protobuf:protobuf-kotlin-lite to 3.21.7 or later
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-kotlin-lite -->
Maven
Update com.google.protobuf:protobuf-kotlin-lite to 3.20.3 or later
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-kotlin-lite -->
Maven
Update com.google.protobuf:protobuf-javalite to 3.21.7 or later
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-javalite -->
Maven
Update com.google.protobuf:protobuf-kotlin to 3.20.3 or later
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-kotlin -->
Maven
Update com.google.protobuf:protobuf-kotlin-lite to 3.16.3 or later
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-kotlin-lite -->
Maven
Update com.google.protobuf:protobuf-java to 3.21.7 or later
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-java -->
Maven
Update com.google.protobuf:protobuf-javalite to 3.20.3 or later
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-javalite -->
Maven
Update com.google.protobuf:protobuf-kotlin to 3.21.7 or later
<!-- Update pom.xml dependency version to 3.21.7 for com.google.protobuf:protobuf-kotlin -->
Maven
Update com.google.protobuf:protobuf-java to 3.19.6 or later
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-java -->
Maven
Update com.google.protobuf:protobuf-kotlin-lite to 3.19.6 or later
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-kotlin-lite -->
Maven
Update com.google.protobuf:protobuf-kotlin to 3.16.3 or later
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-kotlin -->
Maven
Update com.google.protobuf:protobuf-java to 3.16.3 or later
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-java -->
Maven
Update com.google.protobuf:protobuf-java to 3.20.3 or later
<!-- Update pom.xml dependency version to 3.20.3 for com.google.protobuf:protobuf-java -->
Maven
Update com.google.protobuf:protobuf-javalite to 3.16.3 or later
<!-- Update pom.xml dependency version to 3.16.3 for com.google.protobuf:protobuf-javalite -->
Maven
Update com.google.protobuf:protobuf-kotlin to 3.19.6 or later
<!-- Update pom.xml dependency version to 3.19.6 for com.google.protobuf:protobuf-kotlin -->
Bundler
Update google-protobuf to 3.19.6 or later
gem install google-protobuf -v 3.19.6
Bundler
Update google-protobuf to 3.20.3 or later
gem install google-protobuf -v 3.20.3
Bundler
Update google-protobuf to 3.21.7 or later
gem install google-protobuf -v 3.21.7
Bundler
Update google-protobuf to 3.16.3 or later
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).

PackageFixed 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 versions3.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 versions3.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-20
    Improper Input ValidationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.7 score means for each attack dimension.

Attack Vector
Adjacent
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

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

CVSS Score
5.7

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.99%
EPSS percentile: 61.4

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

GHSA-h4h5-3hr4-j3g2

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my pom.xml