Vulnerabilities in pkg:golang/github.com/protocolbuffers/protobuf
PACKAGECVE-2021-22570 is a HIGH (CVSS 7.5) null pointer dereference vulnerability (CWE-476: NULL Pointer Dereference) affecting Withdrawn Advisory libraries in the NuGet ecosystem. The issue involves null pointer dereference in protocol buffers. Remediation is available by upgrading affected packages to version 3.15.0, 0.0.0-20210218195015-ae50d9b99025.
pkg:golang/github.com/protocolbuffers/protobuf
Vulnerability advisories affecting package pkg:golang/github.com/protocolbuffers/protobuf. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-77rm-9x9h-xj3g | CVE-2021-22570 | HIGH | Withdrawn Advisory: NULL Pointer Dereference in Protocol Buffers |
CVE-2021-22570 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-22570
To remediate this vulnerability, upgrade all affected Withdrawn Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade Google.Protobuf to 3.15.0
Upgrade google/protobuf to 3.15.0
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.15.0</version>
</dependency>
Upgrade github.com/protocolbuffers/protobuf to 0.0.0-20210218195015-ae50d9b99025
pip install protobuf>=3.15.0
Upgrade github.com/protocolbuffers/protobuf to 3.15.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for Google.Protobuf
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-22570, inspect your project dependencies for Withdrawn Advisory:
inspect dependencies for Google.Protobuf
Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.15.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In Withdrawn Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-22570 Affected Withdrawn Advisory Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Google.Protobuf
|
NuGet |
< 3.15.0
|
3.15.0
|
|
google/protobuf
|
Packagist |
< 3.15.0
|
3.15.0
|
|
com.google.protobuf:protobuf-java
|
Maven |
< 3.15.0
|
3.15.0
|
|
github.com/protocolbuffers/protobuf
|
Go |
< 0.0.0-20210218195015-ae50d9b99025
|
0.0.0-20210218195015-ae50d9b99025
|
|
protobuf
|
PyPI |
< 3.15.0
|
3.15.0
|
|
github.com/protocolbuffers/protobuf
|
Go |
≥ 0.0.0
< 3.15.0
|
3.15.0
|
References
Frequently Asked Questions
What is CVE-2021-22570?
Which Withdrawn Advisory versions are affected?
What version fixes CVE-2021-22570?
Is Google.Protobuf affected?
Is google/protobuf affected?
What is the CVSS score of CVE-2021-22570?
What CWE is associated with CVE-2021-22570?
How can I check NuGet dependencies for CVE-2021-22570?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-77rm-9x9h-xj3g",
"modified" : "2025-08-25T22:36:48Z",
"published" : "2022-01-27T00:01:15Z",
"withdrawn" : "2025-08-25T22:36:48Z",
"aliases" : [ "CVE-2021-22570" ],
"summary" : "Withdrawn Advisory: NULL Pointer Dereference in Protocol Buffers",
"details" : "### Withdrawn Advisory\n\nThis advisory has been withdrawn because the protobuf vulnerability comes from the compiler rather that the code. This link is maintained to preserve external references.\n\n### Original Description\n\nNullptr 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "Google.Protobuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.15.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "google/protobuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.15.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.google.protobuf:protobuf-java"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.15.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/protocolbuffers/protobuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20210218195015-ae50d9b99025"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "protobuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.15.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/protocolbuffers/protobuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.0"
}, {
"fixed" : "3.15.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-22570"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-77rm-9x9h-xj3g"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/protocolbuffers/protobuf"
}, {
"type" : "WEB",
"url" : "https://github.com/protocolbuffers/protobuf/releases/tag/v3.15.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/protobuf/PYSEC-2022-48.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/04/msg00019.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3DVUZPALAQ34TQP6KFNLM4IZS6B32XSA"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5PAGL5M2KGYPN3VEQCRJJE6NA7D5YG5X"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BTRGBRC5KGCA4SK5MUNLPYJRAGXMBIYY"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IFX6KPNOFHYD6L4XES5PCM3QNSKZBOTQ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KQJB6ZPRLKV6WCMX2PRRRQBFAOXFBK6B"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MRWRAXAFR3JR7XCFWTHC2KALSZKWACCE"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NVTWVQRB5OCCTMKEQFY5MYED3DXDVSLP"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20220429-0005"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-476" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-02-03T22:48:51Z",
"nvd_published_at" : "2022-01-26T14:15:00Z"
}
}