Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulnerability: The deno_core exposes an op_panic in the base runtime which can force a panic in the runtime's containing thread #2017

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions crates/js-sandbox/RUSTSEC-0000-0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "js-sandbox"
date = "2024-07-18"
url = "https://github.com/Bromeon/js-sandbox/issues/31"
categories = ["denial-of-service"]

[versions]
patched = []
```

# op_panic in the base runtime can force a panic in the runtime's containing thread

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) };
```
23 changes: 23 additions & 0 deletions crates/rustyscript/RUSTSEC-0000-0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "rustyscript"
date = "2024-07-18"
url = "https://github.com/rscarson/rustyscript/issues/174"
categories = ["denial-of-service"]

[versions]
patched = [">= 0.6.1"]
unaffected = ["<= 0.3.0"]
```

# op_panic in the base runtime can force a panic in the runtime's containing thread

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.

It can be fixed by stubbing out the exposed op:
```javascript
Deno.core.ops.op_panic = (msg) => { throw new Error(msg) };
```