Back to skill

Security audit

Deep Research with MCP

Security checks for vulnerabilities and agentic risk

Overview

This research skill is not clearly malicious, but it needs review because it fetches arbitrary web URLs with an unsafe shell command and saves reports into the workspace.

Install only if you are comfortable allowing the agent to perform web searches, fetch pages, and write reports into the workspace. Prefer using a hardened fetcher or manually reviewed HTTPS URLs instead of the provided raw curl pattern, especially in environments with secrets, internal network access, or sensitive project files.

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
SKILL.md:105
Finding

Unvalidated Search Result URL Interpolated into a Shell Command

Content
View full analysis
" | python3 -c " import sys, re html = sys.stdin.read() # Strip tags, get text text = re.sub('<[^>]+>', ' ', html) text = re.sub(r'\s+', ' ', text).strip() print(text[:5000]) " ``` ### Technical Analysis The workflow instructs the agent to replace `` with a URL obtained from web-search results and interpolate it directly into a shell command. The URL is not validated or safely passed as a non-shell argument. If a crafted search result contains quotation marks or shell metacharacters, textual substitution can terminate the quoted `curl` argument and append attacker-controlled shell syntax. Any injected command would execute with the permissions of the account running the agent. The flagged pipeline does not inherently download and execute a remote script: the response body is passed as data to a fixed Python parser rather than evaluated as Python or shell code. The vulnerability instead arises from unsafe construction of the surrounding shell command. The retrieval operation also lacks destination restrictions. Curl supports schemes beyond HTTP and HTTPS, while `-L` follows redirects without validating each destination. A malicious URL or redirect could therefore target local files, loopback services, private-network systems, link-local endpoints, or cloud instance metadata. This network and local-resource access exceeds the minimum privileges required to retrieve public research pages. ### Attack Path 1. An attacker causes an MCP search provider or indexed web page to return a crafted URL. 2. The agent selects that URL as a key research source. 3. The agent substitutes the untrusted value into the documented shell command. 4. One of the following exploitation paths occurs: - Shell syntax in the URL escapes the quoted argument ...[truncated 1105 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (4)

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The skill fetches arbitrary remote URLs with curl and pipes the response directly into Python for processing. Even though the Python snippet is fixed, this still causes the agent to retrieve attacker-controlled content, enabling SSRF against internal resources, access to metadata endpoints, large-response denial of service, and unsafe handling of untrusted data outside the MCP trust boundary.

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

For the most promising URLs, fetch full content:

bash
curl -sL "<url>" | python3 -c "
import sys, re
html = sys.stdin.read()
# Strip tags, get text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README’s invocation examples are phrased as ordinary user requests rather than clearly scoped skill triggers, which can cause an agent framework to activate this skill unintentionally during normal conversation. In this skill’s context, unintended activation can lead to unnecessary web searching, external content retrieval, and workspace writes, expanding data exposure and increasing the chance of prompt-injection or untrusted-content processing from fetched pages.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction "When the user asks for research on any topic" does not define specific trigger phrases, boundaries, or exclusion conditions. This broad wording could overlap with many ordinary requests and make it unclear when the skill should activate versus when a normal conversational response is more appropriate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs writing a report into the current working directory without notifying the user or requiring confirmation. In agent environments, silent file writes can create unintended persistence, overwrite nearby project artifacts, or leave unreviewed content in shared workspaces.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.