CVE-2022-37621: thlorenz browserify-shim prototype pollution in resolve-shims

CVE-2022-37621 · Severity: low · CVSS 3.1 · Published 2022-10-29

browserify-shim is a Node.js library used during development to enable browser compatibility for code written for Node.js environments. A prototype pollution vulnerability allows attackers to inject malicious properties into JavaScript objects, potentially leading to arbitrary code execution, data corruption, or denial of service depending on how the affected application uses the modified objects.

Technologies: browserify-shim (npm). Vendors: npm.

Quick answers

Is CVE-2022-37621 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-37621 being exploited in the wild.
How severe is CVE-2022-37621?
Low severity, with a CVSS score of 3.1, published 29 October 2022.
Which products and versions are affected?
browserify-shim (npm) SEMVER:introduced=0,fixed=3.8.16.
Is there a fix for CVE-2022-37621?
Yes. browserify-shim (npm): upgrade to 3.8.16 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2022-37621 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2022-37621?
Check whether you run browserify-shim (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

  • browserify-shim (npm): upgrade to 3.8.16 or later
    npm install browserify-shim@3.8.16

Technical details

A prototype pollution vulnerability exists in the resolveShims function in resolve-shims.js, specifically through the fullPath variable. The vulnerability affects browserify-shim version 3.8.15 and earlier. This is a CWE-1321 class vulnerability that allows an attacker to pollute JavaScript prototypes, which can be exploited if the application processes untrusted input through the vulnerable code path. The vulnerability was fixed in version 3.8.16. No authentication or user interaction is required; exploitation depends on how the vulnerable code is reachable in the application's workflow.

Affected products

  • thlorenz browserify-shim <= 3.8.15

Identifiers

  • CVE-2022-37621
  • GHSA-r737-347m-wqc7

Timeline

  • 2022-10-27: disclosed: Issue reported on GitHub
  • 2022-10-29: advisory: GitHub advisory GHSA-r737-347m-wqc7 published
  • 2022-10-28: patched: Fix available in version 3.8.16 via commit 97855e62

References

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