Null Pointer Dereference Vulnerability in Protobuf Package

protobuf Updated 02 Oct 2025

Summary

26/01/2022
N/A
Yes i
Medium
5.5

CVE-2021-22570: Nullptr dereference when a null char is present in a proto symbol. Affects protobuf across 2 version ranges.

< 3.12.4-1+deb11u1 < ae50d9b9902526efd6c7a1907d09739f959c6297

Fixed in 3.12.4-1+deb11u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Protobuf, or Protocol Buffers, is a language-neutral, platform-neutral extensible mechanism for serializing structured data, developed by Google. It is widely used for data interchange in various applications due to its efficiency and ease of use. However, the package has been found to have a vulnerability that can lead to a null pointer dereference when a null character is present in a proto symbol, which can cause application crashes or unexpected behavior.

Vulnerability Detail

The vulnerability, identified as CVE-2021-22570, arises from the incorrect parsing of a proto symbol containing a null character. This leads to an unchecked call into the proto file's name during the generation of the resulting error message. As a result, the file pointer becomes null, potentially causing a crash or undefined behavior in applications that rely on the Protobuf library. This vulnerability affects multiple versions of the Protobuf package across different Debian ecosystems.

How To Fix

Minimum fixed version

3.12.4-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade protobuf

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately possible, a temporary workaround is to avoid using proto symbols that may contain null characters. However, this is not a permanent solution and upgrading is strongly recommended.

Conclusion

The CVE-2021-22570 vulnerability in the Protobuf package poses a risk of application crashes due to null pointer dereference. It is crucial for users to upgrade to version 3.15.0 or greater to mitigate this risk. Utilizing tools like Vulert can help in monitoring and identifying vulnerabilities in your software.

See every vulnerability recorded for protobuf →

Share this vulnerability

FAQ

CVE-2021-22570 is a vulnerability in the Protobuf package that can lead to a null pointer dereference when a null character is present in a proto symbol.

This vulnerability can cause your application to crash or behave unexpectedly if it relies on the Protobuf library for data serialization.

Versions prior to 3.15.0 are affected. Specific Debian versions have been noted, including Debian 11, 12, and 13.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json. You can check your application at the Vulert playground without any signup.

The CVSS score of CVE-2021-22570 is 5.5, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for protobuf.

How To Fix

Minimum fixed version

3.12.4-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade protobuf

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.