Back to skill

Security audit

SEO Analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent SEO analyzer, but its bundled script fetches arbitrary unvalidated URLs from the user's environment, which could reach local, private-network, or non-web resources.

Install only if you are comfortable with the agent making network requests from your machine. Use it only on URLs you trust or on already-fetched HTML via stdin, and avoid internal hosts, localhost, cloud metadata addresses, file URLs, and untrusted redirecting links until the script restricts protocols and destinations.

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

Warning
Location
seo-analyze.sh:7
Finding
Unrestricted User-Controlled URL Fetching Enables SSRF and Local Resource Access<![CDATA[ ## Vulnerability Details **File Location**: `seo-analyze.sh`, lines 7-11 **Vulnerability Type**: Server-Side Request Forgery (SSRF) and unsafe URL handling **Risk Level**: Medium ### Vulnerable Code ```bash if [[ "${1:-}" == "-" ]]; then HTML=$(cat) URL="(stdin)" else URL="${1:?Usage: seo-analyze.sh <URL>}" HTML=$(curl -sL --max-time 15 -A "Mozilla/5.0 SEO-Analyzer/1.0" "$URL") fi ``` ### Technical Analysis The script accepts a user-controlled URL and passes it directly to `curl` without validating its scheme, destination, resolved IP address, or redirect targets. Consequently, an attacker may cause the host running the skill to request resources that are not normally accessible to the attacker, including: - Loopback services such as `http://127.0.0.1`. - Private-network services. - Link-local cloud metadata endpoints. - Local files through schemes such as `file://`, where supported by the installed `curl`. - A permitted-looking public URL that redirects to an internal destination, because `curl -L` follows redirects without revalidating the target. The script also does not place the `--` end-of-options marker before the user-controlled argument. A value beginning with a hyphen may therefore be interpreted as a `curl` option rather than as a URL. The fetched response is analyzed and selected data is printed in the report, including the title, metadata, canonical URL, heading counts, and keyword statistics. This creates a limited disclosure channel for data obtained from local or internal resources. ### Attack Path 1. An attacker provides a URL pointing to a resource accessible from the Agent host, such as a loopback service, private-network application, or cloud metadata endpoint. 2. Alternatively, the attacker supplies a public URL that redirects to an internal or link-local address. 3. The Agent invokes `seo-analyze.sh` with the attacker-controlled URL as documented by the skill. 4. `curl` accesses the destination using the Agent ...[truncated 971 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Accept only explicitly permitted `http://` and `https://` URLs. 2. Reject URLs containing embedded credentials or malformed host components. 3. Resolve the destination hostname before making the request and reject loopback, private, link-local, multicast, reserved, and otherwise non-public IP addresses for both IPv4 and IPv6. 4. Protect against DNS rebinding by ensuring the address used for the connection is the validated address. 5. Disable all unnecessary `curl` protocols and restrict redirect protocols: ```bash HTML=$(curl \ --proto '=http,https' \ --proto-redir '=http,https' \ -sL \ --max-time 15 \ -A "Mozilla/5.0 SEO-Analyzer/1.0" \ -- "$URL") ``` 6. Do not rely on protocol restrictions alone. Validate every redirect destination and reject redirects to non-public addresses. If this cannot be implemented safely with the current shell design, disable redirects or perform each redirect manually with validation between requests. 7. Add connection and response-size limits to reduce denial-of-service risk. 8. Run the analyzer in a sandbox with restricted network access, no access to cloud metadata endpoints, minimal filesystem permissions, and no sensitive credentials. 9. Add security tests covering loopback addresses, private IPv4 and IPv6 ranges, link-local metadata addresses, alternate IP representations, DNS rebinding, redirect-based bypasses, `file://` URLs, and arguments beginning with `-`. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill instructs users to run shell commands (`./seo-analyze.sh`, `curl | ./seo-analyze.sh`) but does not declare any tool restrictions or permissions in the skill manifest. This creates ambiguity about what execution capabilities the skill expects and increases the risk of unsafe command use, especially because it processes attacker-controlled URLs and suggests piping remote content into a local script.

Missing User Warnings

Low
Confidence
90% confidence
Finding
At L011, the script automatically performs an HTTP request with curl to fetch the supplied URL. While this is central to the analyzer's function, the file provides no explicit warning that running it will contact remote hosts and transmit the requested URL and user-agent string over the network.

Static analysis

No suspicious patterns detected.