CVE-2020-28277
JavaScript vulnerability analysis and mitigation

Overview

Prototype pollution vulnerability in 'dset' versions 1.0.0 through 2.0.1 allows attackers to cause a denial of service and may lead to remote code execution. The vulnerability was discovered and disclosed in December 2020 (WhiteSource DB, NVD).

Technical details

The vulnerability exists in the NPM module 'dset' where the export function accepts three arguments (obj, keys, val) but fails to validate input types before property assignment. Due to the absence of validation for values passed into 'keys' and 'val' arguments, attackers can supply malicious values by adjusting the 'keys' value to include the 'proto' property. This allows direct property assignment to the Object prototype without checking whether the assigned 'keys' is the Object's own property (WhiteSource DB).

Impact

The vulnerability can lead to denial of service conditions and potentially remote code execution. When exploited, attackers can create non-existent properties or manipulate existing properties in the Object prototype. This manipulation can affect all objects in the application, potentially compromising the entire system's security (WhiteSource DB).

Exploitability

The vulnerability is easily exploitable through a simple proof of concept that involves creating an empty object and using dset to pollute its prototype. The exploit requires no special privileges or complex conditions to execute. A proof of concept demonstrates that an attacker can set arbitrary properties on the Object prototype, which affects all objects in the application (WhiteSource DB, GitHub Issue).

Mitigation and workarounds

Several mitigation strategies are available: 1) Freeze objects to prevent adding, removing, or changing properties, 2) Implement JSON input validation with schema validation to ensure only predefined attributes are allowed, 3) Use Object.create to create objects without prototype association. The vulnerability was ultimately fixed in a later version through a commit that addressed the prototype pollution issue (WhiteSource DB, GitHub Commit).

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-2021-43309HIGH7.5
  • JavaScript logoJavaScript
  • uri-template-lite
NoYesAug 24, 2022
CVE-2022-24375HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 24, 2022
CVE-2022-25231HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 23, 2022
CVE-2022-21208HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 23, 2022
CVE-2022-2932MEDIUM6.1
  • JavaScript logoJavaScript
  • mobiledoc-kit
NoYesAug 22, 2022

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