GHSA-4mw5-2636-4535: Js sandbox Remote Code Execution Vulnerability

MODERATE
Published
Advisory Summary

GHSA-4mw5-2636-4535 is a MODERATE remote code execution vulnerability (General Security Weakness) affecting Js sandbox libraries in the crates.io ecosystem. The issue involves op_panic in the base runtime can force a panic in the runtime's containing thread. Remediation is available in the latest vendor maintenance releases.

GHSA-4mw5-2636-4535 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4mw5-2636-4535
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Js sandbox
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-4mw5-2636-4535

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

js-sandbox fixed: Latest secure release
Upgrade js-sandbox to 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:

inspect dependencies for js-sandbox

How to Check if You Are Affected

To determine whether your application is affected by GHSA-4mw5-2636-4535, inspect your project dependencies for Js sandbox:

inspect dependencies for js-sandbox

Analyze the terminal output to locate any version of Js sandbox 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: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Js sandbox, 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

Affected versions use deno_core releases that expose `Deno.core.ops.op_panic` to the JS runtime in the base core This function when called triggers a manual panic in the thread containing the runtime, breaking sandboxing It can be fixed by stubbing out the exposed op: ```javascript Deno.core.ops.op_panic = (msg) => { throw new Error(msg) }; ```

GHSA-4mw5-2636-4535 Affected Js sandbox Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
js-sandbox
crates.io
≤ 0.1.6

References

Frequently Asked Questions

What is GHSA-4mw5-2636-4535?
GHSA-4mw5-2636-4535 is a security vulnerability in Js sandbox involving op_panic in the base runtime can force a panic in the runtime's containing thread under General Security Weakness.
Which Js sandbox versions are affected?
Affected versions include releases prior to current release patches across affected packages: js-sandbox.
What version fixes GHSA-4mw5-2636-4535?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is js-sandbox affected?
Yes, js-sandbox is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-4mw5-2636-4535?
GHSA-4mw5-2636-4535 is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-4mw5-2636-4535?
Run the dependency tree command: 'inspect dependencies for js-sandbox'. 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-4mw5-2636-4535",
  "modified" : "2024-12-04T18:36:38Z",
  "published" : "2024-12-04T18:36:38Z",
  "aliases" : [ ],
  "summary" : "op_panic in the base runtime can force a panic in the runtime's containing thread",
  "details" : "Affected versions use deno_core releases that expose `Deno.core.ops.op_panic` to the JS runtime in the base core\n\nThis function when called triggers a manual panic in the thread containing the runtime, breaking sandboxing\n\nIt can be fixed by stubbing out the exposed op:\n```javascript\nDeno.core.ops.op_panic = (msg) => { throw new Error(msg) };\n```",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "js-sandbox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Bromeon/js-sandbox/issues/31"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Bromeon/js-sandbox"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0403.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-04T18:36:38Z",
    "nvd_published_at" : null
  }
}