GHSA-4mw5-2636-4535: Js sandbox Remote Code Execution Vulnerability
MODERATEGHSA-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
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.
Upgrade js-sandbox to Latest secure release
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
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?
Which Js sandbox versions are affected?
What version fixes GHSA-4mw5-2636-4535?
Is js-sandbox affected?
What CWE is associated with GHSA-4mw5-2636-4535?
How can I check crates.io dependencies for GHSA-4mw5-2636-4535?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}