Back to skill

Security audit

IndexNow

Security checks for vulnerabilities and agentic risk

Overview

This IndexNow skill is mostly coherent, but it should be reviewed because it can fetch arbitrary sitemap URLs from the user’s environment before submitting parsed URLs externally.

Install only if you are comfortable with the skill making external IndexNow submissions and writing a project-scoped key file. Avoid using submit-sitemap-url with untrusted URLs; prefer local sitemap files or clearly public HTTPS sitemap URLs for your own domain, and review the generated .indexnow-key and verification file before committing or deploying.

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/indexnow.sh:242
Finding

Unrestricted Remote Sitemap Retrieval Enables Server-Side Request Forgery

Content
View full analysis

Vulnerability Details

File Location: scripts/indexnow.sh, lines 242–253
Vulnerability Type: Server-Side Request Forgery (SSRF)
Risk Level: Medium

bash
cmd_submit_sitemap_url() {
    local sitemap_url="$1"

    if [ -z "$sitemap_url" ]; then
        log_error "请提供 sitemap URL"
        echo "用法: $0 submit-sitemap-url https://example.com/sitemap.xml"
        exit 1
    fi

    load_key

    log_step "下载 sitemap: $sitemap_url"
    local content
    content=$(curl -sL "$sitemap_url")

Technical Analysis

The submit-sitemap-url command passes a user-controlled URL directly to curl. Redirect following is enabled through -L, but the script does not validate the initial URL, redirect destinations, URL scheme, resolved IP address, port, or destination network range.

Depending on the protocols supported by the installed curl build, the input may reference non-HTTP schemes in addition to HTTP or HTTPS. For HTTP-based requests, an attacker can target loopback addresses, private network services, link-local addresses, cloud instance metadata endpoints, or a public server that redirects to such a destination.

After retrieval, the response is parsed for <loc> elements and the resulting values are submitted to the external IndexNow API. Consequently, data returned by an internal endpoint could be included in an outbound request if it has content matching the expected sitemap syntax. Even when no matching elements are present, the unrestricted request itself can be used to probe the reachability and response behavior of internal services.

Attack Path

  1. An attacker or untrusted user supplies a crafted argument to submit-sitemap-url.
  2. The argument references an internal address, loopback service, metadata endpoint, unsupported non-public scheme, or an attacker-controlled public URL that redirects to one.
  3. The script invokes curl -sL and follows redirects without checking th ...[truncated 1026 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse the input using a URL parser and permit only explicitly required schemes, preferably https.
  2. Reject URLs containing embedded credentials, ambiguous host syntax, fragments, or unnecessary nonstandard ports.
  3. Resolve the hostname before connecting and reject every address in loopback, private, link-local, multicast, unspecified, reserved, and cloud-metadata ranges for both IPv4 and IPv6.
  4. Disable automatic redirects or validate every redirect destination using the same scheme, hostname, port, DNS, and IP-range controls. Apply a small redirect limit.
  5. Mitigate DNS rebinding by ensuring that the address validated is the address used for the connection, such as through controlled DNS resolution and curl address pinning.
  6. Configure connection and total-operation timeouts, a maximum response size, and an appropriate content-type policy.
  7. Validate that the downloaded document is a sitemap and that extracted URLs use HTTP or HTTPS and belong to the expected public site host.
  8. Run the retrieval process with restricted outbound network access so it cannot connect to internal networks or metadata services.
  9. Avoid forwarding parsed values to IndexNow until each value has passed strict URL and host validation.
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 (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to run shell commands and make outbound network requests, but it does not declare any explicit tool scope such as allowed tools or permissions. That creates an authorization gap where the agent may invoke capabilities broader than the user expects, increasing the risk of unintended command execution or network access in response to ambiguous triggers.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

All user-facing natural-language instructions and trigger descriptions are written only in Chinese, while the skill targets a general technical task rather than a clearly region-specific compliance use case. This can amount to an implicit language policy constraint without user opt-in or an explicit statement that the skill supports only Chinese.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases are broad enough to match ordinary SEO or indexing discussions, which can cause the skill to activate when the user did not intend to submit URLs or fetch sitemap data. Because the skill performs shell and network actions, overbroad activation raises the chance of unintended external requests and changes to project files such as key generation and verification-file creation.

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 · scripts/indexnow.sh (reported line 18)May include surrounding context.

sh
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
log_step()  { echo -e "${CYAN}[STEP]${NC} $1"; }

INDEXNOW_API="https://api.indexnow.org/indexnow"
KEY_FILE=".indexnow-key"

# ---- generate-key ----

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/indexnow.sh (reported line 103)May include surrounding context.

sh
local encoded_url
    encoded_url=$(url_encode "$url")
    local code
    code=$(curl -s -o /dev/null -w "%{http_code}" \
        "${INDEXNOW_API}?url=${encoded_url}&key=${API_KEY}")
    format_response "$code" "$url"
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script's user-facing comments, prompts, help text, and status/output messages are written entirely in Chinese, including confirmation prompts and usage guidance. This imposes a specific language on all users without any opt-in or documented locale constraint, which matches the policy's language/locale violation criterion.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.