CVE-2023-36665: protobufjs Prototype Pollution via untrusted protobuf messages

CVE-2023-36665 · Severity: low · CVSS 3.1 · Published 2023-07-05

protobufjs is a JavaScript library for working with Protocol Buffer messages, widely used in web and Node.js applications. An attacker can exploit a prototype pollution vulnerability by providing maliciously crafted protobuf messages that overwrite core JavaScript object properties, potentially leading to arbitrary code execution, data manipulation, or denial of service in applications using the library.

Technologies: protobufjs (npm). Vendors: npm.

Quick answers

Is CVE-2023-36665 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2023-36665 being exploited in the wild.
How severe is CVE-2023-36665?
Low severity, with a CVSS score of 3.1, published 5 July 2023.
Which products and versions are affected?
protobufjs (npm) SEMVER:introduced=7.0.0,fixed=7.2.5.
Is there a fix for CVE-2023-36665?
Yes. protobufjs (npm): upgrade to 7.2.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2023-36665 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2023-36665?
Check whether you run protobufjs (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • protobufjs (npm): upgrade to 7.2.5 or later
    npm install protobufjs@7.2.5

Technical details

protobufjs versions 6.10.0–6.11.3 and 7.0.0–7.2.3 contain a prototype pollution vulnerability that allows attackers to pollute Object.prototype by crafting protobuf messages that exploit the parse(), load(), loadSync(), ReflectionObject.setParsedOption(), and util.setProperty() functions. The vulnerability stems from insufficient input validation when processing untrusted protobuf data; attackers can inject properties into Object.constructor.prototype to overwrite default behavior. The attack requires network reachability if the vulnerable parse function is exposed via an API, or may require user interaction if triggered through file loading. Patches are available in version 6.11.4 and 7.2.5 and later.

Affected products

  • protobufjs protobufjs 6.10.0 through 6.11.3, 7.0.0 through 7.2.3

Identifiers

  • CVE-2023-36665
  • GHSA-h755-8qp9-cq85

Timeline

  • 2023-07-05: disclosed
  • 2023-07-05: patched: Version 6.11.4 and 7.2.5 released with fix

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.