Back to skill

Security audit

Edge Browser

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward user-directed browser fetcher, but users should be careful because it can retrieve and save full page contents from any URL the runtime can reach.

Install only if you need a local headless browser fetch tool. Use it with URLs you trust, avoid local/private-network or cloud metadata addresses, and be careful with --output because the saved JSON may contain full page HTML, private content, or copyrighted text.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch.py:66
Finding
Unrestricted URL Navigation Enables Server-Side Request Forgery## Vulnerability Details **File Location**: `scripts/fetch.py`, lines 66–79 **Vulnerability Type**: Server-Side Request Forgery through unrestricted browser navigation **Risk Level**: High ### Vulnerable Code ```python # 访问页面 page.goto(url, wait_until="networkidle") # 等待动态内容加载 page.wait_for_timeout(wait_time * 1000) # 提取页面信息 result = { "url": url, "title": page.title(), "content": page.content(), "text": page.inner_text("body"), "status": "success" } ``` The URL originates from an unrestricted positional command-line argument: ```python parser.add_argument("url", help="URL to fetch") ``` ### Technical Analysis The skill passes a user-controlled URL directly to Playwright's `page.goto()` without validating the URL scheme, hostname, resolved IP address, port, or redirect destinations. Consequently, Chromium sends requests from the machine on which the skill executes rather than from the user's external network position. An attacker able to control the argument can target loopback addresses, link-local addresses, private network ranges, internal DNS names, or cloud instance metadata services. The browser then extracts the response title, complete HTML, and body text. These values are serialized to standard output or a caller-selected output file, creating a direct channel for disclosing reachable content. Validation must account for DNS resolution and every redirect. Checking only the original URL string would remain vulnerable to redirects, alternate numeric IP representations, IPv6 addresses, or DNS rebinding. ### Attack Path 1. An attacker supplies a URL that identifies a service reachable from the execution environment, such as a loopback administration interface, an RFC 1918 host, or a link-local metadata endpoint. 2. The command-line parser accepts the URL without restrictions. 3. `page.goto()` causes the headless browser to request the selected destination using the host's network access. 4. If the destination redirects, the ...[truncated 1056 chars]
Remediation
## Remediation Suggestions 1. Restrict accepted schemes to `https` and, only where operationally necessary, `http`. Reject URL credentials, ambiguous hostnames, and all other schemes. 2. Resolve the destination hostname before navigation and reject every address in loopback, private, link-local, multicast, unspecified, documentation, and reserved ranges for both IPv4 and IPv6. 3. Explicitly deny cloud metadata destinations, including link-local metadata addresses and provider-specific metadata hostnames. 4. Intercept Playwright requests and validate each destination before allowing it. This must cover main-frame navigation, redirects, subresources, pop-ups, frames, and script-initiated requests. 5. Re-resolve and revalidate hosts at request time to reduce DNS-rebinding exposure. Ensure the browser connects to the validated address. 6. Prefer a strict allowlist of approved domains when the expected use case permits it. 7. Apply outbound firewall or proxy controls so the browser process cannot reach loopback, internal networks, management interfaces, or metadata services even if application-level validation is bypassed. 8. Add tests for IPv4 and IPv6 loopback addresses, private ranges, link-local addresses, encoded or alternative IP representations, internal DNS names, redirects to blocked destinations, and DNS-rebinding scenarios.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documents the ability to save fetched page content to a local file but does not declare any tool scope such as permissions or allowed-tools. That creates a capability/metadata mismatch, which can mislead users and policy layers about what the skill may write locally and reduces visibility into data exfiltration or unintended file creation risks.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The operational documentation and usage guidance are written in Chinese, with no indication that another language is available or that the language choice is intentional and user-driven. This can violate a language/locale policy when users are not given an opt-in or alternative locale.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The module docstring and function documentation are written in Chinese, while the CLI interface otherwise appears general-purpose and does not indicate that Chinese is a required or region-specific locale. This can violate language/locale policy because the skill imposes a specific language without user opt-in or documented justification.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The manifest describes a skill specifically for using Microsoft Edge instead of Chrome, implying browser choice is part of the skill's purpose. Here, if Edge is not found, the implementation launches generic Chromium instead, so the actual behavior can differ from the stated Edge-specific intent.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The documentation presents saving extracted page data to a local file as a normal usage pattern without warning that the output may contain sensitive page content, authentication-protected data, or large amounts of HTML/text. This can lead users to persist sensitive browsing results locally without understanding the privacy or storage implications.

Intent-Code Divergence

Low
Confidence
81% confidence
Finding
The comments and surrounding documentation present the tool as an Edge browser controller, but this comment and the following code explicitly implement a non-Edge fallback. That creates an intent-level contradiction between the documented Edge-specific behavior and the actual implemented behavior.

Static analysis

No suspicious patterns detected.