
Cloud Vulnerability DB
A community-led vulnerabilities database
A prototype pollution vulnerability was discovered in the 'set-or-get' NPM module, affecting versions 1.0.0 through 1.2.10. The vulnerability was disclosed on February 8, 2021, and assigned identifier CVE-2021-25913. The vulnerability exists in the SetOrGet() function, which fails to properly validate object properties before assignment (WhiteSource DB).
The vulnerability stems from the SetOrGet() function's implementation, which accepts three arguments: input, field, and def. The function lacks proper validation of values passed into the field and def arguments, allowing attackers to manipulate the Object prototype. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating its severe impact and ease of exploitation (WhiteSource DB).
Successful exploitation of this vulnerability can lead to denial of service conditions and potentially remote code execution. An attacker can create non-existent properties or manipulate existing properties in the Object prototype, which could affect all objects in the application. If the application performs security checks based on prototype properties, these could be bypassed through pollution (WhiteSource DB).
The vulnerability is easily exploitable through the SetOrGet() function by supplying malicious values that include the proto property. An attacker can pollute the Object prototype by assigning properties directly, which would then affect all objects in the application. A proof of concept demonstrates how an attacker can set arbitrary properties like 'isAdmin' on the Object prototype (WhiteSource DB).
The vulnerability has been patched in version 1.2.11. The fix includes adding validation checks to prevent setting magical attributes like 'proto', 'constructor', and 'prototype'. Users are advised to upgrade to this version. The patch throws an error with the message 'Restricted setting magical attributes' when attempting to set these restricted properties (GitHub Patch).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."