Back to skill

Security audit

Midscene Web

Security checks for vulnerabilities and agentic risk

Overview

This is a legitimate browser automation skill, but it needs review because it can use a logged-in Chrome session and mutable npm packages without a clear explicit consent step.

Install only if you are comfortable with an agent controlling browser pages and possibly authenticated sessions. Prefer the default isolated Puppeteer mode for ordinary browsing or testing, use CDP or Bridge only after explicitly deciding to expose your real Chrome session, and consider pinning Midscene package versions in a controlled environment.

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

Automatic Execution of Mutable Third-Party npm Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:35, with repeated invocations at SKILL.md:127-130, SKILL.md:145-148, SKILL.md:165-249, and an unsafe upgrade instruction at SKILL.md:302
Vulnerability Type: Supply-chain exposure through unpinned or broadly pinned npm dependencies
Risk Level: Medium

Vulnerable Code

bash
Automate web browsing using `npx -y @midscene/web@1`.

Representative runtime commands include:

bash
npx -y @midscene/web@1 connect --url https://example.com
npx -y @midscene/web@1 act --prompt "click the Login button and fill in the email field with 'user@example.com'"
npx -y @midscene/web@1 take_screenshot
npx -y @midscene/web@1 close

The troubleshooting section also recommends installing mutable latest releases:

bash
npm i @midscene/web@latest @midscene/core@latest @midscene/shared@latest

Technical Analysis

The Skill repeatedly directs the Agent to execute npx -y @midscene/web@1. The -y option suppresses installation confirmation, and the major-version specifier @1 does not identify an immutable, audited package release. npm can therefore retrieve and execute a newer matching package version than the one reviewed during this audit.

The recommendation to install dependencies using @latest is even less constrained because it resolves to whichever release the registry currently designates as latest. Neither instruction supplies a lockfile, exact version, package integrity hash, or other mechanism that binds execution to reviewed artifacts.

npm packages can run code through package lifecycle hooks and their normal command entry points. If the publisher account, package distribution process, registry, or a future matching release is compromised, invoking the documented commands can execute attacker-controlled code with the privileges of the Agent process.

This finding identifies supply-chain exposure; the reviewed file does not itself establish that the named packages are currently ...[truncated 1311 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace @1 and @latest with exact, reviewed package versions.
  2. Maintain a committed lockfile and install dependencies using npm ci rather than resolving versions dynamically during Skill execution.
  3. Verify package integrity through lockfile integrity metadata, trusted hashes, signatures, or an approved internal registry.
  4. Remove automatic npx -y retrieval from normal runtime operation. Install audited dependencies during a controlled build or provisioning phase.
  5. Disable npm lifecycle scripts where compatible, such as with --ignore-scripts, and explicitly review any scripts that must remain enabled.
  6. Pin @midscene/web, @midscene/core, and @midscene/shared to mutually compatible exact versions rather than recommending @latest.
  7. Run browser automation in a restricted environment with least-privilege filesystem access, filtered network access, and only the secrets required for the current task.
  8. Separate authenticated CDP or Bridge sessions from dependency installation and update operations to reduce the impact of a supply-chain compromise.
  9. Establish a controlled dependency-update process that includes provenance verification, changelog review, vulnerability scanning, and security testing before changing pinned versions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The mode-selection guidance uses broad triggers such as requests that implicitly require login state, which can cause the agent to choose CDP mode and attach to the user's real browser more often than necessary. In a browser-automation skill, this increases the chance of operating on authenticated sessions, exposing sensitive data or taking account-affecting actions without an explicit, informed opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly recommends controlling the user's existing Chrome and preserving login sessions, but it does not require a prominent warning or consent flow about privacy, authenticated data access, or destructive side effects. Because this skill can browse, scrape, fill forms, and click buttons in a real logged-in browser, the lack of clear warning materially raises the risk of unauthorized access to personal information or unintended account actions.

Content

No source excerpt is available for this finding.