CVE-2022-37257: steal vulnerable to Prototype Pollution via requestedVersion variable
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.3434%
CWE
Published
9/16/2022
Updated
1/30/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| steal | npm | <= 2.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how 'requestedVersion' is processed in convertLater. The function stores callback functions using user-controlled 'requestedVersion' as an object key without prototype protection. When attackers provide malicious version strings like 'proto', they can modify the prototype chain. This matches the CWE-1321 pattern of improper prototype modification. The GitHub advisory specifically calls out 'requestedVersion' in npm-convert.js as the injection vector, and the code shows direct use of this variable in key assignment without safe property checks.