Executive brief
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.
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
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