T09 · Insecure Skill Coding Practices
- Location
index.js:24- Finding
OS Command Injection Through the MCP URL Parameter
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This scraper does not show confirmed data theft, but it contains unsafe command execution and overbroad access to a live browser session.
Review carefully before installing. Use only in an isolated environment, do not connect it to your normal logged-in browser, pin and audit dependencies, and replace the shell-based URL handling with safe argument passing and URL validation before exposing the MCP tool.
index.js:24OS Command Injection Through the MCP URL Parameter
goofish_browse.cjs:3Overprivileged Attachment to an Existing Authenticated Browser Session
SKILL.md:14Non-Reproducible Installation Through Unpinned npm Commands
Attaching to a user's existing Chrome instance via a hardcoded localhost CDP endpoint grants the script visibility into the live browser session, including authenticated pages, cookies, and open-tab context. For a scraping skill, this is unjustified and materially increases the risk of privacy invasion and session abuse if the code is reused or modified.
By enumerating existing browser contexts and pages, the code can inspect and act on arbitrary tabs already open in the connected browser session, not just the intended target site. In the context of a scraping skill, this materially broadens capability into cross-site session access and potential interaction with unrelated authenticated pages, making accidental or intentional data exposure much more dangerous.
brace-expansion 1.1.12 has multiple reported DoS conditions from pathological expansion input. Although it is transitive through older utility packages and may not be directly reachable in normal skill operation, if any attacker-controlled glob/brace patterns reach this library it can cause CPU or memory exhaustion.
express-rate-limit 8.2.1 is reported vulnerable to bypass using IPv4-mapped IPv6 addresses, which can defeat per-client throttling. In this dependency tree it comes from the MCP SDK, so if the skill runs an exposed SDK-backed HTTP server, rate-limit protections may be weaker than intended and abuse becomes easier.
fast-uri 3.1.0 is flagged for multiple URI parsing issues including host confusion and SSRF-relevant normalization failures. Because it is used by AJV-related schema tooling in the SDK dependency chain, exploitability is context-dependent, but malformed attacker-controlled URIs could be misvalidated or misclassified if these code paths are exercised.
hono 4.12.5 carries numerous advisories affecting routing, cookies, static serving, and request handling. Since it is a direct framework dependency of the MCP SDK, any exposed SDK server functionality could inherit these weaknesses, making this a meaningful real vulnerability in the dependency set.
ip-address 10.0.1 is flagged for address parsing inconsistencies and an XSS issue in HTML-emitting methods. Here it is pulled in by express-rate-limit, so the parsing flaw is more relevant than the HTML issue: inconsistent canonicalization can undermine IP-based security decisions such as rate limiting or allow/deny logic.
path-to-regexp 8.3.0 has reported ReDoS issues from crafted route patterns. As a routing dependency used by router/express in the SDK stack, the main risk is service degradation if attacker influence exists over route compilation or matching with pathological patterns.
The script connects to a pre-existing Chrome DevTools Protocol endpoint and enumerates existing browser contexts/pages, which can expose unrelated tabs, authenticated sessions, cookies, and page data outside the stated scraping task. In a skill context, this creates an unjustified capability to access a user's broader browser state, making data leakage or unauthorized interaction significantly more dangerous.
Connecting to an already-running local Chrome instance over CDP gives this script access to the user's existing browser context, including active tabs, session cookies, and authenticated state, rather than a clean isolated automation session. For a scraper, this is unnecessary and significantly increases the risk of covert data access, session hijacking, and abuse of the user's logged-in accounts.
The skill explicitly promotes bypassing anti-bot protections using stealth tooling, but does not adequately warn about legal, privacy, and network-transmission risks. In context, this increases the chance that operators will use the skill to access sites in ways that violate terms of service, trigger abuse defenses, or collect data without sufficient authorization controls.
The skill instructs users to run npx playwright without pinning an explicit version, which can fetch whatever version is current at execution time. This creates a supply-chain and reproducibility risk: a compromised or breaking upstream release could be installed and executed in the user's environment.
The script connects to an existing local Chrome session over CDP, enumerates all contexts/pages, and prints titles and URLs for every open tab before narrowing to the intended target. That behavior exceeds the stated purpose of scraping a specific site and can expose unrelated browsing activity and sensitive page metadata from the user's active session.
The script reads page content from the matched Goofish page and prints extracted navigation and body-derived lines to the console without any warning, filtering, or confirmation. Console output can leak personal, commercial, or otherwise sensitive page data into logs or terminals, especially when the browser session is already authenticated.
The script attaches to a pre-existing Chrome DevTools Protocol endpoint instead of creating an isolated browser instance. That gives the skill access to the state, cookies, tabs, and authenticated context of whatever browser is already running, which exceeds the stated scraping purpose and can expose sensitive user/session data if reused or manipulated.
The script attaches to an already-running local Chrome DevTools Protocol session via a hard-coded websocket endpoint, which can inherit the user's active browser state, cookies, authenticated sessions, and open tabs without any consent prompt or isolation. In this skill's context, that is more dangerous because the stated purpose is to bypass anti-scraping protections, and the code selectively reuses an existing page matching the target site before navigating and extracting content.
The natural-language description and parameter text are presented only in Chinese, which imposes a specific language/locale without offering user opt-in or documenting a justified region-specific constraint. This can violate language/locale policy when the skill is not explicitly limited to Chinese-speaking users.
The manifest describes a Playwright-based scraping skill, which reasonably implies browser automation and network access, but not arbitrary process execution. Using execSync introduces a broader capability—launching local commands—that exceeds what is semantically necessary for the declared tool purpose.
The tool passes a user-controlled URL into execSync through a shell command string: node scripts/playwright-stealth.js "${url}". This creates a command injection risk if the URL contains shell metacharacters or quote-breaking input, and the stealth-scraping context makes the capability more dangerous because it already aims to access protected targets and can be abused to run arbitrary local commands.
The script overrides browser language settings to always report 'zh-CN' and 'zh'. This imposes a specific locale preference without offering the user a choice or documenting a justified region-specific requirement.
The skill performs automated retrieval of a live third-party website and outputs page content without any disclosure, consent check, or scope restriction. In this context, the surrounding anti-detection logic (--disable-blink-features=AutomationControlled, navigator property spoofing) makes the behavior more concerning because it is clearly designed to evade the target site's bot detection while scraping remote content.
The manifest describes a broad scraping capability using Playwright and a stealth plugin to bypass anti-scraping protections. In contrast, this file hard-codes navigation to Goofish searches for specific terms ("代写" and "数学建模") and extracts marketplace listings, which is a much narrower and materially different behavior than a general-purpose scraper.
The code explicitly uses anti-detection techniques for scraping, including disabling Blink automation features and redefining navigator.webdriver to evade bot detection. In the context of a skill advertised as bypassing anti-scraping controls, this facilitates circumvention of site defenses and makes abuse more likely even though it does not contain a full stealth plugin.
The browser context is hard-coded to use the zh-CN locale, which imposes a specific language/locale choice without any indication of user selection or documented justification. The policy for natural-language behavior requires offering a language or locale choice, or clearly documenting why a fixed locale is necessary.
The implementation materially differs from the stated generic scraping purpose by hard-coding searches against Goofish for terms including '代写' (ghostwriting). That mismatch is risky because it conceals a more specific collection objective and can enable scraping in support of academic fraud or other policy-violating marketplace activity.
Detected: suspicious.dangerous_exec