# CVE-2021-22570: Nullptr Dereference in Protobuf

> A null pointer dereference in Protobuf allows attackers to cause a denial of service by providing a malformed proto symbol with a null character.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Jan 2022
- **Updated:** 21 Apr 2025
- **Also known as:** ALSA-2022:7464, ALSA-2022:7970, AZL-9830, CLEANSTART-2026-GA54121, DEBIAN-CVE-2021-22570, GHSA-77rm-9x9h-xj3g, OESA-2022-2106, PYSEC-2022-48, RHSA-2022:7464, RHSA-2022:7970, RHSA-2022:8847, RHSA-2022:8860, RHSA-2024:3433, RLSA-2022:7464, RLSA-2022:7970, ROOT-APP-MAVEN-CVE-2021-22570, SUSE-SU-2022:1040-1, SUSE-SU-2022:1040-2, SUSE-SU-2022:1040-3, UBUNTU-CVE-2021-22570, USN-5490-1, openSUSE-SU-2022:0823-1, openSUSE-SU-2022:1040-1

## What is CVE-2021-22570?

CVE-2021-22570 is a medium-severity vulnerability in Debian Debian Linux, published on 26 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-476 (NULL Pointer Dereference)

## Which versions are affected by CVE-2021-22570?

13 open source packages ship an affected version, including github.com/protocolbuffers/protobuf, com.google.protobuf:protobuf-java and Google.Protobuf. It affects 8 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/protocolbuffers/protobuf` | Go | All versions | 0.0.0-20210218195015-ae50d9b99025 |
| `github.com/protocolbuffers/protobuf` | Go | All versions | 0.0.0-20210218195015-ae50d9b99025 |
| `github.com/protocolbuffers/protobuf` | Go | From 0.0.0 | 3.15.0 |
| `github.com/protocolbuffers/protobuf` | Go | From 0.0.0 | 3.15.0 |
| `com.google.protobuf:protobuf-java` | Maven | All versions | 3.15.0 |
| `com.google.protobuf:protobuf-java` | Maven | All versions | 3.15.0 |
| `Google.Protobuf` | NuGet | All versions | 3.15.0 |
| `Google.Protobuf` | NuGet | All versions | 3.15.0 |
| `google/protobuf` | Packagist | All versions | 3.15.0 |
| `google/protobuf` | Packagist | All versions | 3.15.0 |
| `protobuf` | PyPI | All versions | 3.15.0 |
| `protobuf` | PyPI | All versions | 3.15.0 |
| `protobuf` | PyPI | All versions | 3.15.0 |
| `protobuf` | AlmaLinux:8 | All versions | 3.5.0-15.el8 |
| `protobuf-compiler` | AlmaLinux:8 | All versions | 3.5.0-15.el8 |
| `protobuf-devel` | AlmaLinux:8 | All versions | 3.5.0-15.el8 |
| `protobuf-lite` | AlmaLinux:8 | All versions | 3.5.0-15.el8 |
| `protobuf-lite-devel` | AlmaLinux:8 | All versions | 3.5.0-15.el8 |
| `python3-protobuf` | AlmaLinux:8 | All versions | 3.5.0-15.el8 |
| `protobuf` | AlmaLinux:9 | All versions | 3.14.0-13.el9 |
| `protobuf-compiler` | AlmaLinux:9 | All versions | 3.14.0-13.el9 |
| `protobuf-devel` | AlmaLinux:9 | All versions | 3.14.0-13.el9 |
| `protobuf-lite` | AlmaLinux:9 | All versions | 3.14.0-13.el9 |
| `protobuf-lite-devel` | AlmaLinux:9 | All versions | 3.14.0-13.el9 |
| `python3-protobuf` | AlmaLinux:9 | All versions | 3.14.0-13.el9 |
| `protobuf` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `protobuf-compiler` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `protobuf-compiler-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `protobuf-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `protobuf-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `protobuf-lite` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `protobuf-lite-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `python3-protobuf` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.5.0-15.el8 |
| `protobuf-compiler-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.5.0-15.el8 |
| `protobuf-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.5.0-15.el8 |
| `protobuf-debugsource` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.5.0-15.el8 |
| `protobuf-devel` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.5.0-15.el8 |
| `protobuf-lite-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.5.0-15.el8 |
| `protobuf-lite-devel` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.5.0-15.el8 |
| `protobuf` | Red Hat:enterprise_linux:9::appstream | All versions | 0:3.14.0-13.el9 |

Products: Debian Debian Linux, Fedoraproject Fedora, Google Protobuf, Netapp Active Iq Unified Manager, Netapp Oncommand Insight, Netapp Oncommand Workflow Automation, Netapp Snapcenter, Oracle Mysql.

## How do I fix CVE-2021-22570?

Upgrade github.com/protocolbuffers/protobuf to a fixed version for your release line: 0.0.0-20210218195015-ae50d9b99025 or 3.15.0.

## Is CVE-2021-22570 being exploited?

There is no known exploitation of CVE-2021-22570 in the wild and no public exploit code.

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-22570 and fix it if it is affected.

What it is: CVE-2021-22570 is a medium-severity vulnerability in Debian Debian Linux, published on 26 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-22570 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/protocolbuffers/protobuf (Go): affected all versions; fixed in 0.0.0-20210218195015-ae50d9b99025
- github.com/protocolbuffers/protobuf (Go): affected all versions; fixed in 0.0.0-20210218195015-ae50d9b99025
- github.com/protocolbuffers/protobuf (Go): affected from 0.0.0; fixed in 3.15.0
- github.com/protocolbuffers/protobuf (Go): affected from 0.0.0; fixed in 3.15.0
- com.google.protobuf:protobuf-java (Maven): affected all versions; fixed in 3.15.0
- com.google.protobuf:protobuf-java (Maven): affected all versions; fixed in 3.15.0
- Google.Protobuf (NuGet): affected all versions; fixed in 3.15.0
- Google.Protobuf (NuGet): affected all versions; fixed in 3.15.0
- google/protobuf (Packagist): affected all versions; fixed in 3.15.0
- google/protobuf (Packagist): affected all versions; fixed in 3.15.0
- protobuf (PyPI): affected all versions; fixed in 3.15.0
- protobuf (PyPI): affected all versions; fixed in 3.15.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-22570/ (Markdown: https://insights.sbomify.com/CVE-2021-22570/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-22570
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-22570
- OSV: https://osv.dev/vulnerability/CVE-2021-22570

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-22570/
Summaries are generated and may contain mistakes; the official description above is the record.
