Back to skill

Security audit

Midscene Automations Skills for Browser with Bridge

Security checks for vulnerabilities and agentic risk

Overview

The skill is a legitimate Chrome automation bridge, but it needs review because it can act through logged-in browser sessions, send visual context to configured AI providers, and execute a mutable npx package.

Review this before installing if you may use it on logged-in accounts, internal systems, financial sites, admin consoles, or private data. Prefer a pinned, reviewed Midscene version and only configure model providers you trust with screenshots and visible page content. Require explicit confirmation before sensitive browser actions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:35
Finding
Runtime Execution of a Mutable Third-Party Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 35–44 **Vulnerability Type**: Insecure third-party dependency execution through `npx` **Risk Level**: Medium ### Vulnerable Code ```markdown ## Command Format **CRITICAL — Every command MUST follow this EXACT format. Do NOT modify the command prefix.** ```bash npx @midscene/web@1 --bridge <subcommand> [args] ``` - `--bridge` flag is **MANDATORY** here — it activates Bridge mode to connect to the user's desktop Chrome browser ``` The same mutable command pattern is used by the invocation examples at lines 76, 82, 92–96, and 102. ### Technical Analysis The Skill requires execution of `@midscene/web` through `npx`. If the package is not already installed, `npx` can retrieve package content from the configured npm registry and immediately execute it. The dependency selector `@1` identifies only the major release line rather than an exact, audited release. Consequently, any compatible version subsequently published in the 1.x series may become the code executed by this Skill. The project contains no package lockfile, integrity hash, vendored dependency, or verification procedure that establishes an immutable correspondence between the reviewed Skill and the executable dependency. This creates a supply-chain trust boundary: the effective executable payload can change after the Skill has been audited. Exploitation would require compromise or malicious publication within the accepted package or dependency chain; the audit found no evidence that the currently referenced package is itself malicious. ### Attack Path 1. An attacker compromises the package maintainer, registry publication process, or a transitive dependency accepted by a future `@midscene/web` 1.x release. 2. The attacker publishes malicious code in a version satisfying the `@1` selector. 3. An Agent follows the mandatory command format documented by the Skill. 4. `npx` resolves, downlo ...[truncated 1147 chars]
Remediation
## Remediation Suggestions 1. Replace the major-version selector with an exact, reviewed package version. 2. Declare the dependency in `package.json` and commit a lockfile containing registry-resolved integrity metadata. 3. Install dependencies through a reproducible deployment step, such as `npm ci`, rather than allowing runtime retrieval through `npx`. 4. Invoke the locally installed executable, for example through an npm script or `node_modules/.bin`, and prevent implicit package downloads. 5. Verify package provenance and integrity during installation, and use a trusted registry with appropriate publication and access controls. 6. Review and monitor both the direct package and its transitive dependencies before upgrades. 7. Run browser automation in a restricted environment with only the required filesystem and network access. 8. Provide model API credentials with minimal scope and avoid exposing unrelated secrets to the automation process. 9. Require explicit user confirmation before sensitive browser operations, particularly actions involving authenticated accounts, financial transactions, credential changes, or data disclosure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (1)

Missing User Warnings

Medium
Confidence
97% confidence
Finding
This skill explicitly operates on the user's real Chrome session, preserves cookies and login state, and uses screenshot-driven automation backed by externally configured model APIs. Without a clear warning that screenshots, page content, and user-entered or session-derived sensitive information may be transmitted to third-party model providers, users may unknowingly expose confidential data, making the omission a real security/privacy vulnerability.

Static analysis

No suspicious patterns detected.