Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. safe-eval
  4. ›
  5. CVE-2022-25904

CVE-2022-25904: safe-eval vulnerable to Prototype Pollution

December 20, 2022 (updated April 16, 2025)

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.

References

  • github.com/advisories/GHSA-33vh-7x8q-mg35
  • github.com/hacksparrow/safe-eval
  • github.com/hacksparrow/safe-eval/issues/26
  • nvd.nist.gov/vuln/detail/CVE-2022-25904
  • security.snyk.io/vuln/SNYK-JS-SAFEEVAL-3175701

Code Behaviors & Features

Detect and mitigate CVE-2022-25904 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 0.4.1

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/safe-eval/CVE-2022-25904.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:56 +0000.