Back to skill

Security audit

Email Extractor

Security checks for vulnerabilities and agentic risk

Overview

This email extractor does what it advertises at a basic level, but it fetches arbitrary URLs, exposes a credential-looking API key, and returns an undocumented paid status.

Review before installing. Only use this with public URLs and non-sensitive text unless the URL-fetching behavior is constrained. The publisher should remove and rotate the exposed key, document any billing or payment status behavior, and add URL validation that blocks localhost, private networks, metadata services, redirects to restricted hosts, and oversized responses.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
handler.py:6
Finding
Unrestricted URL Fetching Enables Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `handler.py`, lines 6-11 **Vulnerability Type**: Server-Side Request Forgery (SSRF) **Risk Level**: High ### Vulnerable Code ```python if "http" in input_text: try: url = re.search(r'https?://[^\s]+', input_text).group(0) text = requests.get(url, timeout=10).text except: return {"error": "Could not fetch URL"} ``` ### Technical Analysis The handler extracts an arbitrary HTTP or HTTPS URL from attacker-controlled input and requests it from the server environment. It does not validate the destination hostname, resolved IP address, port, URL credentials, or network range. The `requests.get` call follows redirects by default. Consequently, even an initially acceptable-looking URL could redirect to a loopback, link-local, private, reserved, or cloud metadata address. The timeout only limits request duration and does not prevent SSRF. Although the response is filtered through an email-address regular expression before being returned, the request itself can still reach internal services. The response also creates a limited disclosure channel when internal content contains email-like strings. Requests may additionally trigger state-changing behavior if an internal endpoint improperly accepts GET requests. ### Attack Path 1. An attacker submits input containing a URL controlled by the attacker or pointing directly to an internal destination. 2. The regular expression extracts that URL without applying destination restrictions. 3. The application sends the request from its own network and privilege context. 4. The target may be a loopback service, private-network host, link-local metadata endpoint, or attacker-controlled redirect. 5. Any email-like values in the response are extracted and returned to the attacker. 6. Even without a matching response value, the outbound request can be used for internal service discovery or to invoke reachable GET endpoints. ### Impact Assessment ...[truncated 526 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Prefer an explicit allowlist of trusted domains and permitted ports. - Accept only canonical `http` and `https` URLs parsed by a dedicated URL parser. - Reject URLs containing embedded credentials or malformed hostnames. - Resolve the hostname before connecting and reject loopback, private, link-local, multicast, reserved, unspecified, and cloud metadata address ranges for both IPv4 and IPv6. - Protect against DNS rebinding by ensuring the validated address is the address actually used for the connection. - Disable redirects, or validate the destination of every redirect before following it. - Restrict outbound network access at the firewall or container level so the process cannot contact internal networks or metadata services. - Apply maximum response-size and content-type limits before loading response bodies into memory. - Use separate connection and read timeouts. - Avoid broad exception handling; catch expected request and parsing exceptions explicitly and log failures without exposing sensitive details. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:35
Finding
Hard-Coded API Credential Exposed in Skill Documentation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 35 **Vulnerability Type**: Hard-Coded Secret **Risk Level**: High ### Vulnerable Code ```markdown - API Key: sk_93c5ff38cc3e6112623d361fffcc5d1eb1b5844eac9c40043b57c0e08f91430e ``` ### Technical Analysis A credential-shaped API key is stored in plaintext in documentation distributed with the project. Anyone with access to the package, source repository, build artifacts, logs containing the file, or repository history can retrieve it. The reviewed handler does not reference this key, and the associated service is not identified. Its validity and exact privileges therefore cannot be established from the reviewed files. Nevertheless, embedding a secret in a distributable file violates secret-management practices and should be treated as credential exposure. ### Attack Path 1. An attacker obtains the project source, packaged Skill, documentation, or repository history. 2. The attacker reads the plaintext API key from `SKILL.md`. 3. The attacker identifies or attempts to identify the service accepting the key. 4. If the key is valid, the attacker submits authenticated requests under the credential owner's identity. 5. The attacker may consume paid resources or access capabilities granted to that credential until it is revoked. ### Impact Assessment If valid, the exposed key may permit unauthorized API use, quota consumption, financial charges, or impersonation of the credential owner. The precise scope depends on the permissions assigned by the unidentified service. No evidence in the reviewed files establishes that the key grants administrative privileges or that it has already been abused. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Revoke and rotate the exposed key immediately; deleting the current line is insufficient because the value may remain in repository history or distributed artifacts. - Remove the credential from all tracked files, release archives, documentation, caches, and build outputs. - Purge the secret from version-control history where feasible. - Store replacement credentials in a managed secret store or protected environment variable. - Never place real credential values in usage documentation; use an obvious placeholder instead. - Restrict replacement credentials to the minimum required permissions, quota, and lifetime. - Review provider-side access and billing logs for unauthorized use. - Enable automated secret scanning in pre-commit hooks and continuous-integration pipelines. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill description does not warn users that provided URLs or pasted text may be sent to an external extraction service, creating a transparency and data-handling risk. This is more dangerous in context because users may paste sensitive text or request extraction from internal, private, or authenticated pages, and the embedded API key further suggests external service use without proper disclosure.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The usage examples are phrased as broad, natural-language requests such as 'Get all email addresses from this page,' which can overlap with ordinary conversation and increase the chance of unintended skill activation. In a skill that may transmit URLs or text to an external service, accidental invocation can expose user-supplied content or browsing targets without clear intent.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The skill is presented as a simple email extractor, but it also returns a hard-coded "payment_status": "paid" value unrelated to its stated function. This hidden, misleading output can be used to spoof authorization or billing state in downstream automations that trust the skill response, making the behavior deceptive and security-relevant rather than incidental.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The handler fetches attacker-controlled URLs directly from input, which creates a server-side request risk and can be abused to access internal services, probe network-reachable hosts, or trigger unexpected outbound requests. In the context of an email extraction skill, automatic URL fetching is especially dangerous because users may expect passive parsing, not network access initiated on their behalf.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:36