Skip to main content

CVE-2021-22570: CWE-476 NULL Pointer Dereference in Google LLC Protobuf

Medium
Published: Wed Jan 26 2022 (01/26/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: Google LLC
Product: Protobuf

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.

AI-Powered Analysis

AILast updated: 06/20/2025, 13:49:48 UTC

Technical Analysis

CVE-2021-22570 is a medium-severity vulnerability identified in Google LLC's Protocol Buffers (Protobuf) library, specifically related to a NULL pointer dereference (CWE-476). The issue arises when a null character (\0) is present within a proto symbol, which is a component used in defining message schemas in Protobuf. During parsing, the symbol containing the null character is incorrectly handled, leading to an unchecked call that attempts to access the proto file's name. Because the symbol is malformed, the file pointer is null (nullptr), and this dereference results in a crash or undefined behavior. This vulnerability affects versions of Protobuf prior to 3.15.0, although the exact affected versions are unspecified. The root cause is improper validation and handling of input symbols containing null characters, which leads to an invalid internal state during proto file processing. There are no known exploits in the wild, and no official patch links were provided, but upgrading to Protobuf version 3.15.0 or later is recommended to mitigate the issue. The vulnerability does not require authentication or user interaction to be triggered if an attacker can supply crafted proto files or symbols to a system that processes Protobuf schemas. The impact is primarily a denial-of-service (DoS) condition due to application crashes caused by the NULL pointer dereference. Since Protobuf is widely used for data serialization in numerous applications and services, this vulnerability could affect any system that parses untrusted or malformed proto definitions or messages.

Potential Impact

For European organizations, the impact of CVE-2021-22570 depends on the extent to which they use Google Protobuf in their software stacks, particularly in environments where untrusted input might be processed. The primary risk is denial of service, which could disrupt critical services relying on Protobuf for communication or data serialization. This could affect sectors such as telecommunications, finance, healthcare, and government services where Protobuf is embedded in backend systems, APIs, or microservices architectures. While the vulnerability does not directly lead to remote code execution or data leakage, the resulting crashes could be exploited to cause service outages or degrade system availability. This is particularly concerning for high-availability systems or those with strict uptime requirements. Additionally, if Protobuf is used in security-sensitive contexts (e.g., authentication tokens, configuration management), the inability to properly parse proto files could lead to broader operational issues. Since no known exploits exist, the immediate threat level is moderate, but organizations should not underestimate the potential for DoS attacks leveraging this flaw.

Mitigation Recommendations

European organizations should take the following specific mitigation steps: 1) Inventory and identify all internal and third-party software components that use Google Protobuf, especially versions prior to 3.15.0. 2) Prioritize upgrading all Protobuf dependencies to version 3.15.0 or later, which contains the fix for this vulnerability. 3) Implement input validation and sanitization controls to prevent untrusted or malformed proto symbols containing null characters from being processed. This can include filtering or rejecting proto files or messages with embedded null characters before parsing. 4) Employ runtime monitoring and anomaly detection to identify crashes or abnormal behavior in services that use Protobuf, enabling rapid incident response. 5) For critical systems, consider sandboxing or isolating Protobuf parsing components to limit the blast radius of potential crashes. 6) Engage with software vendors and service providers to confirm they have addressed this vulnerability in their products. 7) Incorporate this vulnerability into vulnerability management and patching cycles to ensure ongoing compliance. These measures go beyond generic advice by focusing on proactive detection, dependency management, and input validation tailored to the nature of the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Google
Date Reserved
2021-01-05T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d984bc4522896dcbf7ef4

Added to database: 5/21/2025, 9:09:31 AM

Last enriched: 6/20/2025, 1:49:48 PM

Last updated: 8/8/2025, 7:51:51 AM

Views: 19

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats