Back to skill

Security audit

cf markdown agents

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Markdown-fetching helper, but it exposes an unscoped arbitrary URL fetch path that can reach non-web or local resources.

Review before installing. Use this only for user-directed fetching of trusted public HTTP(S) pages, and avoid passing URLs from untrusted page content or prompt instructions. The script should ideally restrict protocols to HTTPS, block local/private/link-local destinations, validate redirects, add timeouts and size limits, and avoid printing unnecessary headers.

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
scripts/fetch-markdown.sh:6
Finding

Unrestricted URL Fetching Enables Local File Disclosure and Server-Side Request Forgery

Content
View full analysis
" echo "Example: $0 https://developers.cloudflare.com/agents/" exit 1 fi echo "Fetching Markdown from: $URL" echo "---" # Fetch with Accept header for Markdown curl -sSL "$URL" \ -H "Accept: text/markdown, text/html;q=0.9" \ -D - \ --compressed ``` #### `references/examples.md:56-67` ```typescript const url = new URL(request.url); const targetUrl = url.searchParams.get("url"); if (!targetUrl) { return new Response("Missing url parameter", { status: 400 }); } const response = await fetch(targetUrl, { headers: { Accept: "text/markdown, text/html", }, }); ``` #### `references/examples.md:94-101` ```typescript async fetchPage(url: string): Promise<{ markdown: string; tokens: number }> { const response = await fetch(url, { headers: { Accept: "text/markdown, text/html", }, }); const markdown = await response.text(); ``` ### Technical Analysis The executable script accepts a caller-controlled URL and passes it directly to `curl` without validating its scheme, destination hostname, resolved IP address, port, or redirect targets. The use of `curl -L` follows redirects automatically. Consequently, validating only the initial URL outside the script would not be sufficient: an apparently legitimate public endpoint could redirect the request to a local, private, link-local, or otherwise sensitive destination. In addition to HTTP and HTTPS, curl commonly supports schemes such as `file://`. Because the script does not restrict protocols, a caller may be able to make it read a local file that is accessi ...[truncated 2973 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill invokes a shell script (scripts/fetch-markdown.sh <URL>) but does not declare any tool scope or allowed tools in its metadata. Undeclared shell capability weakens least-privilege controls and can cause an agent platform to grant or use execution capability without explicit governance, which is especially risky because the script accepts arbitrary URLs and may perform network access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation criteria are broad: the skill claims use for generic tasks like web scraping, content extraction, AI processing, and when the user merely mentions terms like cf-markdown or needs structured web content. Overly broad triggering can cause the skill to activate in many unrelated contexts, increasing the chance of unnecessary external fetching, unintended data exposure to third-party sites, or misuse of shell/network capabilities.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/protocol.md (reported line 100)May include surrounding context.

For dynamic pages requiring browser rendering:

bash
curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/markdown" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/protocol.md (reported line 100)May include surrounding context.

For dynamic pages requiring browser rendering:

bash
curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/markdown" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/fetch-markdown.sh (reported line 19)May include surrounding context.

sh
echo "---"

# Fetch with Accept header for Markdown
curl -sSL "$URL" \
    -H "Accept: text/markdown, text/html;q=0.9" \
    -D - \
    --compressed

Static analysis

No suspicious patterns detected.