CVE-2022-37614

Prototype pollution vulnerability in function enable in mockery.js in mfncooper mockery commit 822f0566fd6d72af8c943ae5ca2aa92e516aa2cf via the key variable in…

Critical · published October 12, 2022

CVSS v3.1
9.8
EPSS
2%
Percentile
75.0
In the wild
Unconfirmed
What it is

🔥 A prototype pollution vulnerability in mockery.js means attackers can redefine properties in your program at will — a sneaky potential for mayhem! Think of it like a cunning chef who can secretly swap the ingredients in every dish served at a restaurant, leading to wild and unpredictable outcomes for customers. In this case, the key variable in mockery.js acts as the misleading menu that lets attackers redefine how your code behaves without anyone ever noticing. An attacker could exploit this vulnerability to manipulate objects in your application, which could lead to unexpected behavior, data corruption, or even remote code execution. The consequences could be absolutely devastating, as the attacker gains the ability to control the application's logic and impact all users.

Put simply

Think of it like a cunning chef who can secretly swap the ingredients in every dish served at a restaurant, leading to wild and unpredictable outcomes for customers. In this case, the key variable in mockery.js acts as the misleading menu that lets attackers redefine how your code behaves without anyone ever noticing. This vulnerability occurs in the `enable` function in mockery.js, where it allows an attacker to alter the structure of objects through prototype pollution by manipulating the `key` variable, leading to untrusted behavior in the application.

What to do

An attacker could exploit this vulnerability to manipulate objects in your application, which could lead to unexpected behavior, data corruption, or even remote code execution. The consequences could be absolutely devastating, as the attacker gains the ability to control the application's logic and impact all users. To protect yourself, update mockery.js to the latest version that addresses this vulnerability immediately. Review your usage of the library and implement input validation to safeguard against malicious inputs. Additionally, consider performing a security audit of your application to identify potential exploitation paths. You've got this! By taking these steps, you can ensure your application remains secure and resilient against this prototype pollution threat. 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01554 · 75.0th percentile
Published
2022-10-12T00:00Z
EPSS history
Timeline
  • 12 OCT 00:00Z
    Prototype pollution vulnerability in function enable in mockery.js in mfncooper mockery commit 822f0566fd6d72af8c943ae5ca2aa92e516aa2cf via the key variable in…
    cvelistv5