Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@eryx-org/eryx

Latest version: v0.16.3

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: bsull
86 Stars
17 Forks
9 Versions
1.4K Downloads
Rust Repo language

Scan summary

@eryx-org/eryx was last scanned on 28 Nov 2026 at version 0.16.3. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 9 versions; the latest 3 were published within 7 days (22–28 Nov 2026).
  • Findings: 1 rule fired in version 0.16.3 (37 instances: 37 low). The score describes this version only.
  • Downloads: 1,363 downloads.

Versions

9 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.16.3 LATEST 28 Nov 2026 1 rule fired
0.16.2 25 Nov 2026 1 rule fired
0.16.1 22 Nov 2026 1 rule fired
0.16.0 20 Nov 2026 Not shown
0.15.2 17 Nov 2026 Not shown

Rules fired in 0.16.3: 1

Findings

37 Low

Findings for v0.16.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

WebAssembly module included

The package includes a WebAssembly (.wasm) module. It cannot be reviewed as source, but it runs sandboxed inside the JavaScript runtime and can access only what the host code gives it. WebAssembly is common in parsers, codecs and cryptography libraries. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 37 findings with descriptions and instance counts

The score describes 0.16.3; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@eryx-org/eryx

A Python (and JavaScript and shell) sandbox powered by WebAssembly, for browser and Node.js.

Eryx runs CPython 3.14 inside a WASM sandbox with full isolation — no network, no filesystem, no system access unless you explicitly allow it. Variables persist across calls, state can be snapshotted/restored, and execution can be traced line-by-line.

Install

npm install @eryx-org/eryx

Requirements: Chrome 133+ or Node.js 24+ (requires JSPI; Node.js 24–25 need --experimental-wasm-jspi, Node.js 26+ has it on by default).

Usage

import { Sandbox } from "@eryx-org/eryx";

const sandbox = new Sandbox();
const result = await sandbox.execute('print("Hello from Python!")');
console.log(result.stdout); // "Hello from Python!"
JavaScript and shell

language picks the guest: "python" (the default), "javascript" (QuickJS) or "shell" (a bash-compatible shell, brush). Callbacks, the result variable, output streaming, timeoutMs and networking work the same way; in the shell, a callback is a command (add --a 2 --b 3) that prints its JSON result.

const js = new Sandbox({ language: "javascript", callbacks: { add: ({ a, b }) => a + b } });
await js.execute("console.log(await add({ a: 2, b: 3 }))"); // stdout "5\n"

const sh = new Sandbox({ language: "shell", callbacks: { add: ({ a, b }) => a + b } });
await sh.execute('echo "sum $(add --a 2 --b 3)"'); // stdout "sum 5\n"

Their runtimes are separate files (about 3 MB of WebAssembly each), loaded the first time a sandbox uses them, so an app that only runs Python never downloads them; likewise the Python stdlib is only downloaded for the first Python sandbox. Their sandboxes start with an empty filesystem. An uncaught JavaScript exception or a nonzero exit status rejects with a PythonExceptionError, as in the Python SDK; for the shell its exitCode is the script's exit status. A JavaScript snapshot keeps top-level variables (var, let, const) whose values hold no functions, with shared and circular objects intact; functions, classes and promises are named in skippedGlobals. The shell's own builtins include grep.

Shell commands

A shell sandbox runs uutils coreutils as external commands (cat, sort, head, wc, ls, ...; COREUTILS_TOOLS lists them). They're another 7.6 MB of WebAssembly, downloaded the first time one runs, and coreutils: false leaves them out. Other WASI 0.2 command components can be added by name, each the URL of its jco transpile --instantiation async output (absolute in Node.js). A command that waits (sleep, polling) also needs --async-mode jspi --async-imports 'wasi:io/poll#[method]pollable.block' 'wasi:io/poll#poll' --async-exports 'wasi:cli/run#run', as the bundled coreutils has; without them its waits return at once:

const sh = new Sandbox({
  language: "shell",
  commands: { rg: new URL("./rg/rg.js", import.meta.url) },
});
await sh.execute("printf 'pear\napple\n' | sort | head -n 1"); // "apple\n"

A command runs in batch: it reads all of its stdin, runs to completion, and only then is its output passed on.

  • An endless producer (yes | head) runs until timeoutMs.
  • A CPU-bound command blocks the thread it runs on, so use timeoutMs, which runs the sandbox in a Worker.
  • Each command may write 16 MiB to stdout and to stderr; past that it's stopped (status 134). It's given up to 16 MiB of stdin; past that it fails with limit-exceeded (134).
  • A sandbox has at most 64 commands spawned and not finished, holding at most 64 MiB of stdin and unread output between them. Their own memory isn't bounded beyond what the JavaScript engine allows a WebAssembly memory.
  • Commands share the sandbox's filesystem, and have no network.
  • Data moves through pipes at about 4–10 MiB/s, limited by jco's handling of component-model streams.
Returning a structured result

Assign a variable named result and it is JSON-serialized and returned as result.result — a structured channel separate from stdout:

const result = await sandbox.execute('result = {"answer": 42, "items": [1, 2, 3]}');
console.log(result.result); // { answer: 42, items: [ 1, 2, 3 ] }

If the value is not JSON-serializable, result.result is undefined and result.resultError explains why (execution still succeeds). Use sandbox.setResultVariable("name") to capture a different variable name.

Persistent state

Variables, functions, and imports persist across execute() calls:

await sandbox.execute("x = 42");
await sandbox.execute("import math");
const result = await sandbox.execute("print(math.sqrt(x))");
console.log(result.stdout); // "6.48074069840786"
Snapshots

Save and restore interpreter state:

await sandbox.execute("data = [1, 2, 3]");
const snapshot = await sandbox.snapshotState();

await sandbox.clearState();
await sandbox.restoreState(snapshot);

const result = await sandbox.execute("print(data)");
console.log(result.stdout); // "[1, 2, 3]"
Callbacks

Sandboxed code can await functions you provide, called with its keyword arguments. They can be async, and what they return must be JSON:

import { Sandbox } from "@eryx-org/eryx";

const sandbox = new Sandbox({
  callbacks: {
    get_weather: {
      description: "Get current weather for a city", // shown by list_callbacks()
      handler: async ({ city }) => ({ temp: 72, unit: "F", city }),
    },
    now: () => Date.now(), // no description
  },
});
await sandbox.execute(`
weather = await get_weather(city="NYC")
print(f"Temperature in {weather['city']}: {weather['temp']}°{weather['unit']}")
`);

If a callback throws, the code gets a RuntimeError with its message ("RangeError: no such city"). BigInts are returned exactly, and so is a value wrapped in JSON.rawJSON (JSON.rawJSON("1.0") stays a float).

This is the same callbacks option as eryx.run's client, @eryx-org/eryx-run, which runs the code on eryx.run instead. Both share their error classes and ExecuteResult, so code written against one works with the other.

traceHandler and outputHandler can be set per sandbox too, or for every sandbox with setTraceHandler() and setOutputHandler().

Networking

Networking is off by default. Enable it with a host policy (same rules as the Rust crate's NetConfig; localhost and private ranges stay blocked unless you override blockedHosts, IP addresses are checked against blockedNetworks, and in Node.js so are the addresses a name resolves to, with allowedNetworks and internalHosts as exceptions). At most maxConnections (default 10) are open at once, timeouts are capped by connectTimeoutMs and ioTimeoutMs, and connections are closed when each call into the sandbox finishes. Browsers resolve names themselves, so a name that points at a private address can't be refused there: use allowedHosts rather than allowAllHosts in browsers.

import { Sandbox, setNetConfig } from "@eryx-org/eryx";

const sandbox = new Sandbox({ netConfig: { allowedHosts: ["api.github.com", "*.example.com"] } });
await sandbox.execute(`
import json, urllib.request
repo = json.load(urllib.request.urlopen("https://api.github.com/repos/eryx-org/eryx"))
print(repo["stargazers_count"])
`);

// Or set the default that sandboxes created afterwards start with.
setNetConfig({ allowedHosts: ["api.github.com"] });

Each sandbox has its own policy: netConfig sets it at creation, and sandbox.setNetConfig() replaces it for connections opened afterwards. A sandbox without netConfig copies the default from the module-level setNetConfig() when it is created, so a later setNetConfig() call changes only sandboxes created after it (and the default sandbox behind the module-level execute()).

In Node.js, sandboxed code gets real TCP and TLS sockets. Browsers can't open sockets, so there each request is replayed through fetch(): only HTTP(S) works, one request per connection, and the server must allow cross-origin requests.

Callback replay & suspension

Journal callback results so a re-run of the same script replays them instead of calling your handler again, and let a handler suspend execution until it can answer:

import { Sandbox, SuspendCallback } from "@eryx-org/eryx";

const sandbox = new Sandbox({
  callbacks: {
    approve: ({ action }) => {
      if (!isApproved(action)) throw new SuspendCallback("awaiting approval"); // halts the script
      return true;
    },
  },
});
const first = await sandbox.executeWithJournal(code);
if (first.suspended) {
  save(first.journal); // a JSON string; store it as-is to resume later
}

// Later: completed callbacks replay from the journal; the rest run live.
const resumed = await sandbox.executeWithJournal(code, { journal: load() });

See the Callback Replay & Suspension guide for the matching rules and caveats.

Streaming output

Get stdout/stderr in real-time instead of waiting for execution to complete:

import { Sandbox, setOutputHandler } from "@eryx-org/eryx";

setOutputHandler((stream, data) => {
  const prefix = stream === 0 ? "stdout" : "stderr";
  process.stdout.write(`[${prefix}] ${data}`);
});

const sandbox = new Sandbox();
await sandbox.execute(`
for i in range(5):
    print(f"Step {i}")
`);
Errors

A run that fails rejects with the same errors as eryx.run's client: code that raises rejects with a PythonExceptionError, whose message is the traceback and whose stdout and stderr hold the output before it, and a run past timeoutMs with a TimeoutError. Both are EryxErrors, and say how long the run took (durationMs) and how many callback calls it made (callbackInvocations), as a result does.

import { PythonExceptionError } from "@eryx-org/eryx";

try {
  await sandbox.execute("raise ValueError('bad input')");
} catch (e) {
  if (e instanceof PythonExceptionError) console.log(e.stderr); // ends with the traceback
}
Timeouts and memory

Timeouts are opt-in in JavaScript. Unlike the Rust crate and the Python bindings, which stop an execution after 30 seconds by default, nothing interrupts a call here unless you ask, so while True: pass never returns. Pass timeoutMs to run the sandbox in its own Worker (worker_threads in Node.js) that is terminated when a call runs too long:

import { Sandbox, TimeoutError } from "@eryx-org/eryx";

const sandbox = new Sandbox({ timeoutMs: 5_000 });
try {
  await sandbox.execute("while True: pass");
} catch (e) {
  console.log(e instanceof TimeoutError); // true
}

The call rejects with a TimeoutError (or executeWithJournal() reports it as outcome.error) and the sandbox starts over with fresh Python state; the next successful result has stateWasReset: true. Callbacks, output and networking still run on the creating thread. The Worker costs about 70 MB on top of the sandbox's own memory, and the sandbox's _fileTree isn't available. close() terminates the Worker at once; otherwise it lives until the sandbox is garbage collected.

There is no memory limit, with or without timeoutMs (the Rust crate and the Python bindings cap memory at 128 MB by default). A sandbox's memory grows as its code allocates, up to the WebAssembly 4 GiB maximum or what the JavaScript engine allows, and its in-memory filesystem has no size cap either. Run untrusted code that might allocate without bound in a process you can afford to lose.

Node.js and the WASI shims

Under Node.js, eryx loads the in-memory (browser) build of @bytecodealliance/preview2-shim, because the Node.js build backs WASI with the real filesystem. Each sandbox gets its own in-memory filesystem, so state set through the shim's module-wide functions (such as _setFileData()) never reaches a sandbox.

Vite / webpack

The package works with Vite and webpack. For Vite, you'll need cross-origin isolation headers for SharedArrayBuffer:

// vite.config.ts
export default defineConfig({
  server: {
    headers: {
      "Cross-Origin-Opener-Policy": "same-origin",
      "Cross-Origin-Embedder-Policy": "require-corp",
    },
  },
});

API

Sandbox
Method Returns Description
new Sandbox(options?) Sandbox Create an isolated sandbox; options can set its language, callbacks, traceHandler, outputHandler, netConfig and timeoutMs
execute(code) Promise<ExecuteResult> Run Python code: stdout, stderr, result, durationMs, callbackInvocations, ...
executeWithJournal(code, { journal? }) Promise<ReplayOutcome> Run with callback journaling/replay
setResultVariable(name) Promise<void> Change the captured result variable
setNetConfig(config) void Replace this sandbox's network policy (null disables networking)
close() void Close connections, stop a timeoutMs Worker, reject later calls (also using)
snapshotState() Promise<StateSnapshot> Serialize interpreter state (data) and name the globals left out (skippedGlobals)
restoreState(snapshot) Promise<void> Restore from a snapshot or its data
clearState() Promise<void> Reset all user state

Each Sandbox is its own WebAssembly instance, with its own interpreter, filesystem, network connections, callbacks and journal; code in one can't see another's state. The compiled code is shared, but each instance has its own memory (about 20 MB idle on Node.js 24). Call sandbox.close() (or declare it with using) when you're done; a sandbox that is only dropped is freed whenever the garbage collector gets to it. The module-level execute(), executeWithJournal() and setResultVariable() use one default sandbox, created on first use.

Calls on one sandbox run one at a time, in call order: a call made while another is running waits for it to finish. So don't await execute() on the same sandbox from inside one of its callbacks, since it would wait on the execution that called it. Different sandboxes run independently.

Handlers and errors
Export Description
setTraceHandler(fn) Receive line-level execution trace events (default)
setOutputHandler(fn) Receive streaming stdout/stderr (default)
SuspendCallback Throw from a callback to suspend execution
EryxError, PythonExceptionError, TimeoutError, ... The errors a run rejects with, shared with @eryx-org/eryx-run

Moving from @bsull/eryx

This package was @bsull/eryx. Apart from the name:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @eryx-org/eryx

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229