VYPR
Critical severityNVD Advisory· Published Apr 11, 2023· Updated Feb 10, 2025

CVE-2023-26121

CVE-2023-26121

Description

All versions of the safe-eval npm package are vulnerable to Prototype Pollution via the safeEval function due to insufficient input sanitization, allowing attackers to pollute Object.prototype.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

All versions of the safe-eval npm package are vulnerable to Prototype Pollution via the safeEval function due to insufficient input sanitization, allowing attackers to pollute Object.prototype.

Vulnerability

Overview

CVE-2023-26121 affects all versions of the safe-eval npm package. The vulnerability is a Prototype Pollution issue in the safeEval function, which fails to properly sanitize its parameter content [1]. Prototype Pollution occurs when an attacker can inject properties into the Object.prototype, which then propagates to all JavaScript objects via the prototype chain [3].

Exploitation

An attacker can exploit this by passing crafted JavaScript code to safeEval. The code can manipulate the __proto__ property or use techniques like Error.prepareStackTrace to gain access to the internal this context and pollute the prototype [4]. No authentication is required if the function is exposed to user input, making it a significant risk for applications that evaluate untrusted code.

Impact

Successful exploitation can lead to denial of service (via exceptions), property injection, or even remote code execution if the application relies on polluted properties for security decisions or control flow [3]. The vulnerability undermines the intended sandboxing of safe-eval, which was designed to provide a safer alternative to eval() [2].

Mitigation

As of the publication date, no patch is available; all versions are affected. The vendor recommends using safe-eval only with trusted, self-generated content [2]. Users should consider replacing it with a more robust sandboxing solution or avoiding dynamic code evaluation altogether.

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
safe-evalnpm
<= 0.4.2

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.