Skip to content

protobuf-cpp and protobuf-python have potential Denial of Service issue

High severity GitHub Reviewed Published Sep 22, 2022 in protocolbuffers/protobuf • Updated Jul 5, 2024

Package

pip protobuf (pip)

Affected versions

< 3.18.3
>= 3.19.0, < 3.19.5
>= 3.20.0, < 3.20.2
>= 4.0.0, < 4.21.6

Patched versions

3.18.3
3.19.5
3.20.2
4.21.6

Description

Summary

A message parsing and memory management vulnerability in ProtocolBuffer’s C++ and Python implementations can trigger an out of memory (OOM) failure when processing a specially crafted message, which could lead to a denial of service (DoS) on services using the libraries.

Reporter: ClusterFuzz

Affected versions: All versions of C++ Protobufs (including Python) prior to the versions listed below.

Severity & Impact

As scored by google
Medium 5.7 - CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Asscored byt NIST
High 7.5 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

A small (~500 KB) malicious payload can be constructed which causes the running service to allocate more than 3GB of RAM.

Proof of Concept

For reproduction details, please refer to the unit test that identifies the specific inputs that exercise this parsing weakness.

Mitigation / Patching

Please update to the latest available versions of the following packages:

  • protobuf-cpp (3.18.3, 3.19.5, 3.20.2, 3.21.6)
  • protobuf-python (3.18.3, 3.19.5, 3.20.2, 4.21.6)

References

@sbenzaquen sbenzaquen published to protocolbuffers/protobuf Sep 22, 2022
Published by the National Vulnerability Database Sep 22, 2022
Published to the GitHub Advisory Database Sep 23, 2022
Reviewed Sep 23, 2022
Last updated Jul 5, 2024

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS score

0.326%
(72nd percentile)

CVE ID

CVE-2022-1941

GHSA ID

GHSA-8gq9-2x98-w8hf

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.