Is @browserbasehq/stagehand safe?
- Node.js shell/command execution
- Node.js dynamic code execution
- Node.js network egress
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
@browserbasehq/stagehand is an npm package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: dynamic code execution, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@browserbasehq/ stagehand 4.3.0
Get notified when this component changes
Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of @browserbasehq/stagehand's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (4)
The code turns strings into live code at runtime (eval / new Function / exec).
new Function("");Why it matters: If those strings aren't fixed and trusted, they become a way to run arbitrary code.
Fix: Avoid evaluating dynamically constructed code; if unavoidable, ensure the input is a trusted constant and never derived from external data.
The component can run operating-system commands or spawn processes.
import { spawn } from "node:child_process";spawnChrome: (executablePath, args, options) => spawn(executablePath, args, {const taskkill = spawn("taskkill", [Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
The component makes outbound network requests.
const response = await fetch(currentUrl, {return await fetch(currentUrl, {if (typeof init?.body !== "string") return await fetch(input, init);
return await fetch(input, init);
if (!body || typeof body !== "object" || Array.isArray(body)) return await fetch(input, init);
return await fetch(input, {const locatorRuntimeResponse = await fetch(chrome.runtime.getURL("content-script.js"));import { validateHeaderName, validateHeaderValue } from "node:http";const response = await fetch(request, { signal });async fetch(params) {async fetch(input) {return await createBrowserbaseServices(apiKey, baseUrl).fetch(params);
Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An MCP tool surface (manifest or tool definitions) was found.
Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in @browserbasehq/stagehand.
The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →