CVE-2021-25913
JavaScript vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitability

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).

Mitigation and workarounds

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).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-73421CRITICAL9.1
  • JavaScript logoJavaScript
  • next-auth
NoYesAug 13, 2026
CVE-2026-73420CRITICAL9.1
  • JavaScript logoJavaScript
  • next-auth
NoYesAug 13, 2026
CVE-2026-73305HIGH8.8
  • JavaScript logoJavaScript
  • @budibase/server
NoNoAug 13, 2026
CVE-2026-73408HIGH7.6
  • JavaScript logoJavaScript
  • @budibase/server
NoNoAug 13, 2026
CVE-2026-73428MEDIUM4.6
  • JavaScript logoJavaScript
  • action_text-trix
NoYesAug 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management