GHSA-876r-hj45-fw7g: Safer eval Sandbox Breakout / Arbitrary Code Vulnerability

CRITICAL
Published
Advisory Summary

GHSA-876r-hj45-fw7g is a CRITICAL sandbox breakout / arbitrary code vulnerability (General Security Weakness) affecting Safer eval libraries in the npm ecosystem. The issue involves sandbox breakout / arbitrary code execution in safer-eval. Remediation is available in the latest vendor maintenance releases.

GHSA-876r-hj45-fw7g at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-876r-hj45-fw7g
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Safer eval
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-876r-hj45-fw7g

To remediate this vulnerability, upgrade all affected Safer eval dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

safer-eval fixed: Latest secure release
npm install safer-eval@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls safer-eval

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-876r-hj45-fw7g, inspect your project dependencies using npm:

npm ls safer-eval

Analyze the terminal output to locate any version of Safer eval in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls safer-eval command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Safer eval, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

All versions of `safer-eval` are vulnerable to Sandbox Escape leading to Remote Code Execution. It is possible to escape the sandbox by forcing exceptions recursively in the evaluated code. This may allow attacker to execute arbitrary code in the system. ## Recommendation The package is not suited to receive arbitrary user input. Consider using an alternative package.

GHSA-876r-hj45-fw7g Affected Safer eval Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
safer-eval
npm
≥ 0.0.0

References

Frequently Asked Questions

What is GHSA-876r-hj45-fw7g?
GHSA-876r-hj45-fw7g is a security vulnerability in Safer eval involving Sandbox Breakout / Arbitrary Code Execution in safer-eval under General Security Weakness.
Which Safer eval versions are affected?
Affected versions include releases prior to current release patches across affected packages: safer-eval.
What version fixes GHSA-876r-hj45-fw7g?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is safer-eval affected?
Yes, safer-eval is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-876r-hj45-fw7g?
GHSA-876r-hj45-fw7g is classified under General Security Weakness.
How can I check npm dependencies for GHSA-876r-hj45-fw7g?
Run the dependency tree command: 'npm ls safer-eval'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-876r-hj45-fw7g",
  "modified" : "2020-08-31T18:51:25Z",
  "published" : "2020-09-03T21:18:41Z",
  "aliases" : [ ],
  "summary" : "Sandbox Breakout / Arbitrary Code Execution in safer-eval",
  "details" : "All versions of `safer-eval` are vulnerable to Sandbox Escape leading to Remote Code Execution. It is possible to escape the sandbox by forcing exceptions recursively in the evaluated code. This may allow attacker to execute arbitrary code in the system.\n\n\n## Recommendation\n\nThe package is not suited to receive arbitrary user input. Consider using an alternative package.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "safer-eval"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://gist.github.com/JLLeitschuh/609bb2efaff22ed84fe182cf574c023a"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1221"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:51:25Z",
    "nvd_published_at" : null
  }
}