CVE-2021-22570
Nullptr Dereference in Protobuf
Also known as GHSA-77rm-9x9h-xj3g, PYSEC-2022-48
Mitigation
- Upgrade protobuf to 3.15.0 or later.
- Upgrade Google.Protobuf to 3.15.0 or later.
- Upgrade google/protobuf to 3.15.0 or later.
- Upgrade com.google.protobuf:protobuf-java to 3.15.0 or later.
- Upgrade github.com/protocolbuffers/protobuf to one of 0.0.0-20210218195015-ae50d9b99025, 3.15.0 (or later in the same release line).
Who should check
- Projects that depend on PyPI package protobuf (< 3.15.0)
- Projects that depend on NuGet package Google.Protobuf (< 3.15.0)
- Projects that depend on Packagist package google/protobuf (< 3.15.0)
- Projects that depend on Maven package com.google.protobuf:protobuf-java (< 3.15.0)
- Projects that depend on Go package github.com/protocolbuffers/protobuf (< 0.0.0-20210218195015-ae50d9b99025)
- Anyone running Google LLC Protobuf >= unspecified, < 3.15.0
Vulnerability facts
- Affected
- protobuf < 3.15.0; Google.Protobuf < 3.15.0; google/protobuf < 3.15.0; com.google.protobuf:protobuf-java < 3.15.0; github.com/protocolbuffers/protobuf < 0.0.0-20210218195015-ae50d9b99025
- Fixed in
- 3.15.0, 0.0.0-20210218195015-ae50d9b99025
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 6.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 2.51% chance of exploitation in 30 days (percentile 86, 2026-11-26)
- CWE
- CWE-476
- Modified
Description
Nullptr dereference when a null char is present in a proto symbol. The symbol is parsed incorrectly, leading to an unchecked call into the proto file's name during generation of the resulting error message. Since the symbol is incorrectly parsed, the file is nullptr. We recommend upgrading to version 3.15.0 or greater.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI protobuf | < 3.15.0 | 3.15.0 | osv |
| NuGet Google.Protobuf | < 3.15.0 | 3.15.0 | osv |
| Packagist google/protobuf | < 3.15.0 | 3.15.0 | osv |
| Maven com.google.protobuf:protobuf-java | < 3.15.0 | 3.15.0 | osv |
| Go github.com/protocolbuffers/protobuf | < 0.0.0-20210218195015-ae50d9b99025 | 0.0.0-20210218195015-ae50d9b99025, 3.15.0 | osv |
| Google LLC Protobuf | >= unspecified, < 3.15.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-22570. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-22570.md Affected: protobuf < 3.15.0; Google.Protobuf < 3.15.0; google/protobuf < 3.15.0; com.google.protobuf:protobuf-java < 3.15.0; github.com/protocolbuffers/protobuf < 0.0.0-20210218195015-ae50d9b99025 Fixed in: 3.15.0, 0.0.0-20210218195015-ae50d9b99025 Steps: 1. Search this machine and project for protobuf (PyPI), Google.Protobuf (NuGet), google/protobuf (Packagist), com.google.protobuf:protobuf-java (Maven), github.com/protocolbuffers/protobuf (Go), Google LLC Protobuf: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IFX6KPNOFHYD6L4XES5PCM3QNSKZBOTQ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3DVUZPALAQ34TQP6KFNLM4IZS6B32XSA/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NVTWVQRB5OCCTMKEQFY5MYED3DXDVSLP/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BTRGBRC5KGCA4SK5MUNLPYJRAGXMBIYY/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5PAGL5M2KGYPN3VEQCRJJE6NA7D5YG5X/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KQJB6ZPRLKV6WCMX2PRRRQBFAOXFBK6B/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MRWRAXAFR3JR7XCFWTHC2KALSZKWACCE/
- https://github.com/advisories/GHSA-77rm-9x9h-xj3g
- https://nvd.nist.gov/vuln/detail/CVE-2021-22570
Other
- https://github.com/protocolbuffers/protobuf/releases/tag/v3.15.0
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://security.netapp.com/advisory/ntap-20220429-0005/
- https://lists.debian.org/debian-lts-announce/2023/04/msg00019.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IFX6KPNOFHYD6L4XES5PCM3QNSKZBOTQ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3DVUZPALAQ34TQP6KFNLM4IZS6B32XSA/
- https://github.com/protocolbuffers/protobuf
- https://github.com/pypa/advisory-database/tree/main/vulns/protobuf/PYSEC-2022-48.yaml
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3DVUZPALAQ34TQP6KFNLM4IZS6B32XSA
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5PAGL5M2KGYPN3VEQCRJJE6NA7D5YG5X
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BTRGBRC5KGCA4SK5MUNLPYJRAGXMBIYY
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IFX6KPNOFHYD6L4XES5PCM3QNSKZBOTQ
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KQJB6ZPRLKV6WCMX2PRRRQBFAOXFBK6B
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MRWRAXAFR3JR7XCFWTHC2KALSZKWACCE
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NVTWVQRB5OCCTMKEQFY5MYED3DXDVSLP
- https://security.netapp.com/advisory/ntap-20220429-0005
FAQ
Is CVE-2021-22570 being exploited?
There is no confirmed exploitation: CVE-2021-22570 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.51% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-22570?
Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2021-22570?
protobuf < 3.15.0; Google.Protobuf < 3.15.0; google/protobuf < 3.15.0; com.google.protobuf:protobuf-java < 3.15.0; github.com/protocolbuffers/protobuf < 0.0.0-20210218195015-ae50d9b99025.
Is there a fix for CVE-2021-22570?
Yes. Fixed in 3.15.0, 0.0.0-20210218195015-ae50d9b99025. Upgrade protobuf to 3.15.0 or later. Upgrade Google.Protobuf to 3.15.0 or later. Upgrade google/protobuf to 3.15.0 or later. Upgrade com.google.protobuf:protobuf-java to 3.15.0 or later. Upgrade github.com/protocolbuffers/protobuf to one of 0.0.0-20210218195015-ae50d9b99025, 3.15.0 (or later in the same release line).
How do I check if I'm affected by CVE-2021-22570?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.