CVE-2020-28442
JavaScript vulnerability analysis and mitigation

Overview

All versions of package js-data are vulnerable to Prototype Pollution via the deepFillIn function. The vulnerability was discovered on October 29, 2020, and publicly disclosed on December 14, 2020. This vulnerability affects the js-data package, which is a robust, framework-agnostic in-memory data store (Snyk Advisory).

Technical details

The vulnerability exists in the deepMixIn and deepFillIn functions of the js-data package. The issue allows an attacker to manipulate JavaScript's object prototype chain through unsafe recursive merge operations. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) by NVD and 7.5 (HIGH) by Snyk. The vulnerability is tracked as CVE-2020-28442 and is classified under CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes) (Snyk Advisory).

Impact

When exploited, this vulnerability can lead to either denial of service by triggering JavaScript exceptions or tampering with the application source code to force the code path that the attacker injects. This can potentially lead to remote code execution. The vulnerability affects multiple environments including application servers, web servers, and web browsers (Snyk Advisory).

Exploitability

The vulnerability has a proof-of-concept exploit available. An attacker can exploit this vulnerability by supplying a payload with Object.prototype setter to introduce or modify properties within the global prototype chain. The exploit requires no privileges and can be executed without user interaction (Snyk Advisory).

Mitigation and workarounds

For versions before 3.0.10, users should upgrade to version 3.0.10 or higher to fix this vulnerability. Additionally, several preventive measures can be implemented: 1) Freeze the prototype using Object.freeze(Object.prototype), 2) Require schema validation of JSON input, 3) Avoid using unsafe recursive merge functions, 4) Consider using objects without prototypes (Object.create(null)), and 5) Use Map instead of Object as a best practice (Snyk Advisory).

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