HistoryEditJSON (OSV)

RUSTSEC-2024-0405

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

Reported
Issued
Package
rustyscript (crates.io)
Type
Vulnerability
Categories
References
Patched
  • >=0.6.1
Unaffected
  • <=0.3.0

Description

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:

Deno.core.ops.op_panic = (msg) => { throw new Error(msg) };

Advisory available under CC0-1.0 license.