safe-eval vulnerable to Prototype Pollution
Date: 2022-12
Affected: npm/safe-eval
Attack vector: other
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2022-25904
CWE: CWE-1321
CVSS: 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

All versions of package safe-eval are vulnerable to Prototype Pollution which allows an attacker to add or modify properties of the Object.prototype.Consolidate when using the function safeEval. This is because the function uses vm variable, leading an attacker to modify properties of the Object.prototype.


Mitigations:

Architectural layers (MAESTRO):