Null Pointer Dereference Vulnerability in Protobuf Package

protobuf Updated 02 Oct 2025

Summary

26/01/2022
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2021-22570: Nullptr dereference when a null char is present in a proto symbol. Affects protobuf versions < 3.12.4-1+deb11u1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Protobuf (Protocol Buffers) package is a language-agnostic serialization library developed by Google, designed to facilitate the efficient exchange of structured data between applications. It is widely used in various software systems for data serialization and communication. However, a vulnerability has been identified that can lead to a null pointer dereference when a null character is present in a proto symbol, potentially causing application crashes or unexpected behavior.

Vulnerability Detail

The vulnerability arises from improper handling of null characters in proto symbols during parsing. When a null character is encountered, the symbol is incorrectly parsed, leading to an unchecked call into the proto file's name. This results in a null pointer dereference, which can crash the application or lead to undefined behavior. The issue has been assigned the identifier DEBIAN-CVE-2021-22570 and affects multiple versions of the Protobuf package across various Debian releases.

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

As a temporary workaround, ensure that your application does not process proto symbols that may contain null characters. This can be done by validating input data before parsing or sanitizing the input to remove any null characters.

Conclusion

In summary, the null pointer dereference vulnerability in the Protobuf package poses a significant risk to applications utilizing this library. It is crucial to upgrade to the patched versions to mitigate potential issues. Additionally, using tools like Vulert can help monitor and manage vulnerabilities in your software effectively.

See every vulnerability recorded for protobuf →

Share this vulnerability

FAQ

A null pointer dereference occurs when a program attempts to access or modify memory at a location that has not been allocated, leading to crashes or undefined behavior.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your manifest file, such as package-lock.json, to check for vulnerabilities.

The vulnerability affects Protobuf versions prior to 3.12.4-1+deb11u1 for Debian 11 and versions prior to 3.21.9-3 for Debian 12, 13, and 14.

While the primary risk is application crashes or undefined behavior, there is no direct indication of data loss. However, unexpected behavior could lead to unintended consequences.

Detailed information about this vulnerability can be found in the Debian CVE database at the provided source link.

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