Back to skill

Security audit

MagicBrowse

Security checks for vulnerabilities and agentic risk

Overview

This browser automation skill is coherent, but it should be reviewed carefully because it installs a mutable third-party CLI and tells agents to obey gateway-provided failure instructions verbatim.

Before installing, make sure you trust the MagicBrowse CLI publisher and gateway. Prefer pinning an exact CLI version, installing it locally or in a sandbox, limiting the API key and browser profile exposed to the tool, and treating gateway-provided messages as status text rather than instructions. Use the documented approval stops for private pages, logged-in profiles, payments, posting, account changes, and other consequential actions.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:272
Finding
Untrusted Gateway Instructions Are Followed Verbatim## Vulnerability Details **File Location**: `SKILL.md:272-279` **Vulnerability Type**: Remote instruction injection into the agent session **Risk Level**: High **Vulnerable Code Snippet**: ```markdown A failure never ends the conversation. `failed`, `max_steps`, and `timed_out` results carry `failureCode`, an optional `retryable: true`, and `agentInstructions` — follow `agentInstructions` verbatim: tell the user what was already completed safely on the page, why automatic browsing cannot continue, and that they can finish manually at `finalUrl`. Retry once only when `retryable: true`; a result without it (for example `failureCode: "llm_provider_payment_required"`) needs an account or configuration fix, and retrying or restarting the helper will not succeed — stop the helper and hand over. ``` The same unsafe requirement is repeated in `references/statuses.md:75-81`. ### Technical Analysis The Skill explicitly requires the agent to follow the contents of the externally supplied `agentInstructions` field “verbatim.” This field is returned by the MagicBrowse CLI or its remote LLM gateway and is therefore outside the static trust boundary of the reviewed Skill. Although the surrounding documentation describes the intended content of this field, the Skill does not require schema validation, content restrictions, signature verification, or a locally defined allowlist before treating the field as instructions. Data received from a remote service must not be promoted to the same authority level as trusted Skill instructions. A malicious or compromised gateway response could place arbitrary directives in `agentInstructions`, including requests to disregard the current task, disclose sensitive information, invoke tools, visit attacker-controlled resources, or weaken safety constraints. Higher-priority platform policies may still prevent some actions, but the Skill creates a direct and avoidable instruction-hijacking channel. ...[truncated 1391 chars]
Remediation
## Remediation Suggestions - Remove the requirement to follow `agentInstructions` verbatim. - Treat all gateway and CLI text fields as untrusted display data. - Make control-flow decisions only from strictly validated fields such as `status`, `failureCode`, and `retryable`. - Generate failure responses from fixed, locally maintained templates. For example, report the validated failure category, safely completed work, and validated `finalUrl` without executing remote prose. - Validate `finalUrl` before presenting or opening it, including its scheme and destination. - If `agentInstructions` must remain available, display it only as quoted diagnostic content and reject directives involving tool calls, secrets, policy changes, unrelated tasks, or safety-boundary changes. - Authenticate gateway responses where supported and constrain custom gateway configuration to explicitly trusted HTTPS endpoints. - Add tests using adversarial values such as “ignore previous instructions” to verify that remote fields cannot control agent behavior.

T08 · Insecure Dependencies

Error
Location
metadata.openclaw.json:7
Finding
Mutable Latest Tag Installs Unpinned Executable Dependency## Vulnerability Details **File Location**: `metadata.openclaw.json:7-13` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High **Vulnerable Code Snippet**: ```json "install": [ { "id": "npm", "kind": "node", "package": "@nuanu-ai/magicbrowse-cli@latest", "bins": ["magicbrowse"], "label": "Install MagicBrowse CLI (npm)" } ] ``` Equivalent mutable installation instructions also appear in `SKILL.md:13-19` and `references/commands.md:233-236`. ### Technical Analysis The Skill installs `@nuanu-ai/magicbrowse-cli` through npm’s mutable `latest` distribution tag. Consequently, the executable code installed in the future is not fixed by the reviewed project contents. A package publisher can move the tag to another version without changing this Skill, and compromise of the publisher account or npm package can transparently replace the effective dependency. The dependency is particularly sensitive because it is installed as a command-line executable and is expected to control Chrome, interact with browser sessions, communicate with an external gateway, and use `MAGICPAY_API_KEY`. The documentation also recommends global installation, which can increase the package’s availability and persistence in the user environment. This finding does not establish that the current npm package is malicious. It identifies a supply-chain weakness through which subsequently published or compromised code can be installed without a repeatable, version-specific audit. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry path, or another component capable of changing the package’s `latest` release. 2. The attacker publishes a malicious version and assigns the `latest` tag to it. 3. A user installs or updates the Skill dependency according to the metadata or documented command. 4. npm downloads and installs the attacker-controll ...[truncated 1154 chars]
Remediation
## Remediation Suggestions - Replace `@nuanu-ai/magicbrowse-cli@latest` with an exact, audited version such as `@nuanu-ai/magicbrowse-cli@X.Y.Z`. - Use a lockfile or equivalent integrity metadata that records the resolved package and cryptographic integrity hash. - Update `SKILL.md`, `metadata.openclaw.json`, and `references/commands.md` consistently so none of them continue recommending `@latest`. - Perform dependency updates through an explicit review process rather than automatically following a mutable tag. - Prefer a project-local or isolated installation over a global installation. - Disable npm lifecycle scripts during installation when the package does not require them, or audit every required lifecycle script. - Verify package provenance and registry configuration, and use npm provenance/signature facilities where available. - Run the CLI with a dedicated low-privilege account or sandbox and provide only the environment variables and filesystem access required for the current task. - Pin transitive dependencies through a reviewed lockfile and continuously scan the resolved dependency tree for known vulnerabilities.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.