Back to skill

Security audit

Generate Instagram marketing content from product URLs. Extract product information and create engaging Instagram posts with image suggestions, captions, and hashtags optimized for engagement. Use when user provides a product URL from e-commerce sites like Amazon, Shopify, Taobao, etc. and wants Instagram marketing content such as Image/text post ideas, engaging captions with CTAs, hashtag strategy, or Story/reels content suggestions.

Security checks for vulnerabilities and agentic risk

Overview

The skill is generally aligned with Instagram content generation, but its helper script can fetch any user-supplied URL without safety checks.

Install only if you are comfortable with the helper script making outbound web requests from your agent environment. Use it with ordinary public product URLs, avoid internal or private URLs, and prefer running it in a network-restricted sandbox until URL validation and redirect/IP-range protections are added.

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/extract_product.py:31
Finding

Server-Side Request Forgery Through Unrestricted Product URL Fetching

Content
View full analysis

Vulnerability Details

File Location: scripts/extract_product.py:31-44 and scripts/extract_product.py:262-264
Vulnerability Type: Server-Side Request Forgery (SSRF)
Risk Level: High

Vulnerable Code

python
def __init__(self, url: str):
    self.url = url
    self.domain = urlparse(url).netloc.lower()
    self.product_data = {}

def extract(self) -> Dict:
    """Main extraction method - routes to domain-specific extractor."""
    if not REQUESTS_AVAILABLE:
        return self._get_manual_extraction_prompt()

    try:
        headers = {
            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36'
        }
        response = requests.get(self.url, headers=headers, timeout=15)

The URL originates directly from a command-line argument:

python
url = sys.argv[1]
extractor = ProductExtractor(url)
result = extractor.extract()

Technical Analysis

The script accepts an arbitrary URL and passes it directly to requests.get() without validating its scheme, hostname, resolved IP address, port, or redirect destinations.

No controls prevent requests to loopback, private, link-local, reserved, or cloud metadata addresses. Because requests follows redirects by default, an initially public URL can also redirect to an internal destination. Hostname-only checks would be insufficient because DNS rebinding or a hostname resolving to a prohibited address could bypass them.

The response is loaded as a complete body through response.text before parsing. There is no response-size limit or streaming byte budget, so a malicious endpoint can also return an excessively large response and consume significant memory.

Attack Path

  1. An attacker supplies a product URL such as an internal service address, cloud metadata endpoint, attacker-controlled hostname resolving to a private address, or public URL that redirects to one.
  2. The Agent foll ...[truncated 1584 chars]
Remediation
View remediation

Remediation Suggestions

  1. Permit only explicitly supported schemes, normally https and, only if necessary, http. Reject URLs containing credentials, malformed hosts, or unsupported ports.
  2. Resolve the hostname before connecting and reject every address that is loopback, private, link-local, multicast, unspecified, reserved, or otherwise non-global.
  3. Disable automatic redirects or validate the scheme, hostname, port, and resolved addresses of every redirect target before following it.
  4. Prefer an explicit allowlist of supported e-commerce domains when business requirements permit. Match normalized hostnames exactly or as controlled subdomains rather than using substring tests.
  5. Protect against DNS rebinding by ensuring the validated address is the address used for the connection, or by enforcing equivalent destination restrictions at an outbound proxy or firewall.
  6. Stream responses and enforce a strict maximum byte count. Reject unexpected content types before parsing.
  7. Apply outbound network controls that block access to loopback, private networks, link-local metadata services, and internal management interfaces.
  8. Consider disabling environment-derived proxy configuration with an appropriately configured requests.Session when proxy inheritance is not required.
  9. Replace detailed network exception strings returned to users with generic errors, while retaining sanitized diagnostic details in protected logs.
  10. Add tests covering direct private IP addresses, IPv6 loopback and link-local addresses, encoded or unusual IP forms, DNS names resolving to private addresses, redirect chains, unsupported schemes, and oversized responses.
Vulnerability Patterns
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • 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
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises a content-generation skill for Instagram marketing, including engaging posts, captions, CTAs, hashtags, and content suggestions. The supplied code only implements URL-based product extraction and light heuristic enrichment. While this extraction could support a later marketing-generation step, that core generation behavior is absent from the code chunk. The network fetching and HTML parsing of product pages are consistent with the extraction part of the description, but the primary advertised outcome—actual Instagram marketing content creation—is not implemented here.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/extract_product.py (reported line 239)May include surrounding context.

python
return 'Feed Post (Lifestyle with product)'

    def _get_manual_extraction_prompt(self) -> Dict:
        """Return prompt for manual extraction when libraries unavailable."""
        return {
            'error': 'Required libraries not available. Please install: pip install requests beautifulsoup4',
            'manual_extraction_needed': True,

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs use of a network-capable extraction script against arbitrary user-supplied product URLs, but the manifest declares no explicit tool scope or permissions. This creates an authorization and review gap: operators and users cannot accurately assess that the skill may fetch remote content, increasing the risk of unintended outbound requests, SSRF-style access to internal resources, or policy bypass if execution environments permit networking.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs a server-side HTTP GET to a fully user-supplied URL with no validation of scheme, host, or IP range. This creates an SSRF primitive that could be used to reach internal services, cloud metadata endpoints, or other unintended network locations; the lack of disclosure is secondary to the larger issue that arbitrary remote fetching is allowed at all.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.