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

@insforge/instabox-sdk

Latest version: v0.10.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: carmendou, fermioniclyu, insforge-npm, junwenfeng, tony430
15 Versions
175.0K Downloads

Scan summary

@insforge/instabox-sdk was last scanned on 28 Nov 2026 at version 0.10.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 15 versions; the latest was published on 28 Nov 2026.
  • Findings: No rules fired in version 0.10.0.
  • Downloads: 175,022 downloads.

Versions

15 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.10.0 LATEST 28 Nov 2026 No rules fired
0.9.0 11 Nov 2026 No rules fired
0.8.0 10 Nov 2026 No rules fired
0.7.1 6 Nov 2026 Not shown
0.7.0 6 Nov 2026 Not shown

No rules fired in 0.10.0

Findings

Findings for v0.10.0. 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.

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

README

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

@insforge/instabox-sdk

TypeScript SDK for InstaBox: create sandboxes on Firecracker dev machines, run commands in them, read and write files, pause and resume them, save and restore snapshots and SSH in.

  • Zero runtime dependencies. Uses the global fetch (Node 18+, Bun, Deno, Cloudflare Workers). Before 0.5.2 Cloudflare Workers failed every request with TypeError: Illegal invocation; upgrade, or pass { fetch: (...a) => fetch(...a) }.
  • ESM and CommonJS builds with type declarations.

Install

npm install @insforge/instabox-sdk

Authentication

Create an API key on the API Keys page of the instabox dashboard (or instabox keys create in the CLI), then either set it in the environment:

export INSTABOX_API_KEY=...
export INSTABOX_API_URL=https://api.instabox.sh   # optional, this is the default

or pass it in code (options win over env vars):

const sandbox = await Sandbox.create({ apiKey: '...', apiUrl: 'https://...' })

The key is sent as the X-API-Key header.

Scopes
Scope Allows
machines:read Sandbox.list, getInfo, isRunning, vault
machines:write create, connect (resume), pause, resume, stop, setAutoSuspend, setMetadata, disableVault, pushVault, commands, files, sshCredentials
machines:delete kill
images:read Resolve private snapshot names, listSnapshots, getSnapshot
images:write createSnapshot
images:delete deleteSnapshot

:write and :delete imply :read. Creating from a template or a snapshot ID needs only machine scopes. Creating from a snapshot name also needs images:read. Snapshot permissions are named images:* by the current API. Add images:write and images:delete if your code saves and deletes snapshots. A call outside the key's scopes throws InstaboxAuthError (403 insufficient_scope).

Quickstart

import { Sandbox } from '@insforge/instabox-sdk'

const sandbox = await Sandbox.create() // agent-browser
const r = await sandbox.commands.run('node -v')
console.log(r.stdout)
await sandbox.kill()

Sandbox.create(template?, opts?) takes a template ID (agent-browser), a private snapshot name (my-setup) or a snapshot ID (sn_...). It defaults to agent-browser (universal with a desktop and browser preinstalled, which the dashboard's Computer tab shows; universal on a server without it). The free plan creates from agent-browser, android or ci only; the other templates (universal, t3, herdr, orca) need a paid plan, and on free they throw 403 template_not_allowed. Template IDs take precedence over snapshot names. An unknown name or an ambiguous snapshot name throws before creating a machine; use an ID to select a specific snapshot.

const sandbox = await Sandbox.create('agent-browser', {
  name: 'my-box', // default sbx-<random>; lowercase letters, digits and '-'
  envs: { NODE_ENV: 'development' }, // applied to every commands.run of this object
  metadata: { userId: 'u_42' }, // labels stored with the sandbox (plaintext: not for secrets)
  vault: false, // for a sandbox made for someone else: none of the account's Vault items
  archiveMs: 24 * 60 * 60_000, // stops it at this deadline
})
console.log(sandbox.sandboxId) // m_...

Sizes are fixed by the service: 4 vCPU, 8 GiB memory, a 16 GiB root disk and a 20 GiB /data disk. The vcpus, memMiB, diskGiB and rootDiskGiB options are for other deployments; api.instabox.sh refuses them (400 spec_not_allowed).

create waits for the create operation to succeed. getInfo().machine.runtime.ready reports guest readiness. archiveMs is optional (60 seconds to 24 hours) and becomes getInfo().archiveAt.

Commands

const r = await sandbox.commands.run('npm test', {
  cwd: '/data/home/app',
  stdin: '',
  envs: { CI: '1' },
  timeoutMs: 120_000,
  onStdout: (out) => process.stdout.write(out),
  onStderr: (err) => process.stderr.write(err),
})
// r: { stdout, stderr, exitCode, timedOut, truncated }

A non-zero exit throws CommandExitError, which carries stdout, stderr and exitCode:

import { CommandExitError } from '@insforge/instabox-sdk'

try {
  await sandbox.commands.run('exit 3')
} catch (e) {
  if (e instanceof CommandExitError) console.log(e.exitCode, e.stderr)
}

With onStdout or onStderr, the output is streamed: each callback is called with every chunk as the command writes it, while the command runs. The call still resolves (or throws CommandExitError) with the whole stdout and stderr once the command ends. A callback's returned promise is awaited before the next chunk. Streamed output is not capped, so truncated is false; without callbacks the result arrives in one response, each output stream limited to 1 MiB.

// Prints 1, 2 and 3 about a second apart, as the command writes them.
await sandbox.commands.run('for i in 1 2 3; do echo $i; sleep 1; done', {
  onStdout: (out) => process.stdout.write(out),
})

The API returns timedOut and truncated flags. A command that runs past timeoutMs throws CommandExitError with timedOut: true and exitCode 124. stdin is a string or a Uint8Array, and reaches the command byte for byte: up to 1 MiB of UTF-8 goes in the exec request itself, and anything else (bytes that are not UTF-8, or more than 1 MiB) is first uploaded to a temporary file in the sandbox (/tmp/.instabox-stdin-*, mode 0600) that the command reads and removes as it starts, as instabox exec --stdin does. That file goes over the file routes (up to 5 GiB), or in base64 chunks over exec on a server without them. Command timeouts are 1–600 seconds; the default HTTP request deadline, which covers the whole stream, allows an additional 30 seconds for the result. An explicit requestTimeoutMs overrides that default. signal (an AbortSignal) stops a command: the request is closed, which kills the command in the sandbox, and run throws InstaboxError with code aborted. A callback that throws also ends the command, and run rejects with that error.

background: true starts the command detached, as a job in its own session, and returns { pid, jobId, kill(), wait() } right away. It is not limited to 10 minutes: use it for builds and test runs that may take longer. Its stdout and stderr go to one log in the sandbox (~/.instabox/jobs/<jobId>/out). wait({ onStdout }) follows that log, calling onStdout with each new chunk from the start, and resolves with the whole log as stdout and the exit code; a non-zero exit throws CommandExitError. wait({ timeoutMs }) gives up with InstaboxTimeoutError (code job_wait_timeout) and signal stops waiting; the job keeps running either way. kill() sends SIGTERM to the command and everything it started; it returns false if they had all exited. run does not take onStdout or onStderr together with background: true (it throws InstaboxError with code bad_request): pass onStdout to wait() instead. Background commands need bash, util-linux setsid and GNU coreutils (stat, dd, base64) in the sandbox; on an image without them run throws InstaboxError with code background_unsupported, naming what is missing, before starting anything. With a requestTimeoutMs of 5 seconds or less, wait() cannot long-poll and checks the log every 0.25 to 2 seconds instead. The CLI sees the same jobs: instabox jobs ls, instabox jobs logs <sandbox> <jobId> -f, instabox jobs wait.

const build = await sandbox.commands.run('cargo test', { background: true, cwd: '/data/home/app' })
const r = await build.wait({ onStdout: (out) => process.stdout.write(out) }) // throws CommandExitError if it fails

const server = await sandbox.commands.run('node server.js', { background: true })
await server.kill()

Changed in 0.6.0: onStdout and onStderr were called once, after the command finished, with its whole output; they are now called with each chunk as it is written. A background command's output was discarded; it is now kept in its job's log, which wait() and the CLI's instabox jobs commands read. Remove old logs with rm -rf ~/.instabox/jobs/<jobId>. onStdout or onStderr passed with background: true were ignored; they now throw bad_request.

Files

await sandbox.files.write('/data/home/app.js', 'console.log(1)') // string, bytes or a stream -> { path }
const text = await sandbox.files.read('/data/home/app.js') // string; throws not_utf8 if the file is not UTF-8
const bytes = await sandbox.files.read('/data/home/logo.png', { format: 'bytes' })
const entries = await sandbox.files.list('/data/home') // [{ name, path, type: 'file' | 'dir' }]
await sandbox.files.exists('/data/home/app.js') // boolean
await sandbox.files.remove('/data/home/tmp') // files or directories

Large files, whole directories and binary stdin (the paths are relative to HOME in the sandbox, and to the current directory locally):

import { createReadStream, createWriteStream } from 'node:fs'
import { readFile } from 'node:fs/promises'
import { Readable } from 'node:stream'
import { pipeline } from 'node:stream/promises'

// Stream a file of any size (up to 5 GiB) in, and back out, without holding it in memory.
await sandbox.files.write('dataset.bin', createReadStream('dataset.bin'))
await pipeline(Readable.fromWeb(await sandbox.files.readStream('dataset.bin')), createWriteStream('copy.bin'))

// A whole directory, one call each way.
const up = await sandbox.files.upload('my-app', 'my-app') // { path: '/data/home/my-app', files, bytes }
const down = await sandbox.files.download('my-app/dist', 'dist') // { path: 'dist', remotePath, files, bytes }

// Bytes on stdin arrive exactly as sent.
const logo = await readFile('logo.png')
const { stdout } = await sandbox.commands.run('sha256sum', { stdin: new Uint8Array(logo) })

read, readStream and write move the bytes in one request each over the API's file routes (GET /v1/machines/{id}/files/content and PUT /v1/machines/{id}/files), the path instabox cp uses, as the sandbox's user. Measured from us-west on 2026-10-30: about 1.3 s to write and 1.4 s to read 3 MiB, and under 3 s each for 10 MiB. A server without those routes gets base64 chunks over exec (about 21 s per MiB written), and there a write is capped at 10 MiB.

write takes a string, a Uint8Array (or Buffer, ArrayBuffer), or a stream: a Node Readable (fs.createReadStream), a web ReadableStream, or any AsyncIterable of Uint8Array or string chunks (an async generator). A stream is sent as it is read, so memory stays flat whatever its size: 100 MiB moved with about 6 MiB of chunks alive at once (test/stream-memory.test.ts holds it under 16 MiB). The server takes up to 5 GiB per file (MAX_UPLOAD_BYTES; too_large past it) and drops a transfer that moves nothing for 60 seconds; the SDK gives up on a streamed write that moves nothing for 2 minutes (InstaboxTimeoutError, request_timeout). A stream can be sent only once, so a streamed write is never retried; bytes are, on 502 to 504. An error thrown by your stream rejects write with InstaboxError code source_error (the original as cause), and the file keeps its old content. signal stops a write (aborted).

read loads the file into memory and is capped at 10 MiB by default (file_too_large): pass maxBytes to raise it, or use readStream. readStream(path) resolves once the file is open, to a ReadableStream<Uint8Array> that is also async-iterable (for await), with no size cap; in Node, Readable.fromWeb(stream) makes it a Node stream. A missing file or a directory rejects the promise with not_found before any byte; a stream that ends short of the file's size errors with file_changed.

write creates parent directories, checks the size and SHA-256 the server reports (transfer_mismatch when they differ) and replaces the file atomically; an existing file keeps its mode, a new one gets 0644. Writing to a path that is a directory throws InstaboxError with code is_a_directory; reading a missing path or a directory throws not_found. read returns a string only for valid UTF-8: a file with other bytes (an image, an archive, a compiled binary) throws InstaboxNotUtf8Error (code not_utf8, status 0, "file is not UTF-8 text; read it with { format: 'bytes' }") and never a string with U+FFFD in place of the bad bytes. Read such a file with { format: 'bytes' }, which returns its exact bytes. Relative paths are relative to HOME (one exec looks it up, once per sandbox object). HOME is /data/home, on the persistent disk. list, exists and remove run over exec.

Directories: upload and download

files.upload(localDir, remoteDir) puts the contents of a local directory into remoteDir, and files.download(remoteDir, localDir) the contents of a sandbox directory into localDir, in one call each. They move one gzipped tar the way instabox push and instabox pull do: upload packs it locally as it streams it to a temporary file in the sandbox (/tmp/.instabox-transfer-*) over PUT /v1/machines/{id}/files, then unpacks it there with tar; download packs the directory with tar in the sandbox (as root when sudo allows it, as the file routes read), streams the archive back over GET /v1/machines/{id}/files/content and unpacks it as it arrives. Neither holds the archive in memory, and the temporary file is removed. On a server without the file routes the archive moves in base64 chunks over exec instead.

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 @insforge/instabox-sdk

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

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

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

Frame 2085668439 (1)
Group 1261154229