# CVE-2021-22570: Nullptr Dereference in Protobuf

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 2.51% (percentile 86, 2026-11-26)
- **CWE:** CWE-476
- **Aliases:** GHSA-77rm-9x9h-xj3g, PYSEC-2022-48
- **Published:** 2022-01-26T00:00:00.000Z
- **Modified:** 2026-09-10T03:49:11.266Z

## 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

## 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

- PyPI `protobuf`: affected \< 3.15.0; fixed 3.15.0 (osv)
- NuGet `Google.Protobuf`: affected \< 3.15.0; fixed 3.15.0 (osv)
- Packagist `google/protobuf`: affected \< 3.15.0; fixed 3.15.0 (osv)
- Maven `com.google.protobuf:protobuf-java`: affected \< 3.15.0; fixed 3.15.0 (osv)
- Go `github.com/protocolbuffers/protobuf`: affected \< 0.0.0-20210218195015-ae50d9b99025; fixed 0.0.0-20210218195015-ae50d9b99025, 3.15.0 (osv)
- Google LLC Protobuf: \>= unspecified, \< 3.15.0 (cvelist)

## 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).

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IFX6KPNOFHYD6L4XES5PCM3QNSKZBOTQ/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3DVUZPALAQ34TQP6KFNLM4IZS6B32XSA/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NVTWVQRB5OCCTMKEQFY5MYED3DXDVSLP/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BTRGBRC5KGCA4SK5MUNLPYJRAGXMBIYY/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5PAGL5M2KGYPN3VEQCRJJE6NA7D5YG5X/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KQJB6ZPRLKV6WCMX2PRRRQBFAOXFBK6B/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MRWRAXAFR3JR7XCFWTHC2KALSZKWACCE/>
- vendor: <https://github.com/advisories/GHSA-77rm-9x9h-xj3g>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-22570>
- other: <https://github.com/protocolbuffers/protobuf/releases/tag/v3.15.0>
- other: <https://www.oracle.com/security-alerts/cpuapr2022.html>
- other: <https://security.netapp.com/advisory/ntap-20220429-0005/>
- other: <https://lists.debian.org/debian-lts-announce/2023/04/msg00019.html>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IFX6KPNOFHYD6L4XES5PCM3QNSKZBOTQ/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3DVUZPALAQ34TQP6KFNLM4IZS6B32XSA/>
- other: <https://github.com/protocolbuffers/protobuf>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/protobuf/PYSEC-2022-48.yaml>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3DVUZPALAQ34TQP6KFNLM4IZS6B32XSA>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5PAGL5M2KGYPN3VEQCRJJE6NA7D5YG5X>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BTRGBRC5KGCA4SK5MUNLPYJRAGXMBIYY>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IFX6KPNOFHYD6L4XES5PCM3QNSKZBOTQ>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KQJB6ZPRLKV6WCMX2PRRRQBFAOXFBK6B>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MRWRAXAFR3JR7XCFWTHC2KALSZKWACCE>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NVTWVQRB5OCCTMKEQFY5MYED3DXDVSLP>
- other: <https://security.netapp.com/advisory/ntap-20220429-0005>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-22570>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2022-48> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-77rm-9x9h-xj3g> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-22570> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-22570>
