Back to skill

Security audit

XCrawl Map

Security checks for vulnerabilities and agentic risk

Overview

The skill’s XCrawl API behavior is mostly disclosed and purpose-aligned, but it requests broad local file read/write/search tools that are not needed for URL mapping.

Review this skill before installing. Use it only for domains you are authorized to send to XCrawl, and be aware that the URL mapping request and API credential are sent to XCrawl’s service. The main concern is its overbroad local file permissions; a safer version would remove Write, Edit, and broad Grep access and narrowly read only ~/.xcrawl/config.json.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:4
Finding
Excessive Filesystem Permissions Violate Least Privilege<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 4 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Code ```yaml allowed-tools: Bash(curl:*) Bash(node:*) Read Write Edit Grep ``` ### Technical Analysis The Skill’s declared purpose is to submit URL-mapping requests to the XCrawl API. Its documented workflow requires network access through `curl` or `node` and read access to `~/.xcrawl/config.json` for the API key. The declared `Write`, `Edit`, and broad `Grep` capabilities are not required by that workflow. They allow the Agent to search, create, or modify accessible local files even though the Skill performs a read-only mapping operation. This also conflicts with the Skill’s own tool policy at lines 34–35, which says to request runtime permissions for `curl` and `node` only. The API key’s transmission to the explicitly documented HTTPS endpoint is necessary for the declared service and was not identified as credential exfiltration. The security issue is the unrelated local filesystem authority granted alongside that network operation. ### Attack Path 1. A user activates the Skill for an XCrawl mapping task. 2. The Skill makes `Read`, `Write`, `Edit`, and `Grep` available in addition to its required network tools. 3. Malicious, injected, or mistakenly interpreted instructions direct the Agent to search local files or modify files unrelated to mapping. 4. The Agent uses `Grep` or `Read` to discover accessible local information and `Write` or `Edit` to alter accessible files. 5. These operations occur under the host Agent’s filesystem privileges, exceeding the authority required for the requested mapping task. This path is conditional on the Agent following malicious or erroneous instructions; the audited file does not itself direct the Agent to perform those operations. ### Impact Assessment Successful exploitation could expose the contents and names of files accessib ...[truncated 465 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `Write`, `Edit`, and `Grep` from `allowed-tools`, because they are not required for URL mapping. 2. Retain only one necessary network execution path where possible, rather than granting both broad `curl` and `node` execution. 3. Replace unrestricted `Read` access with a narrowly scoped mechanism that can read only `~/.xcrawl/config.json`. 4. Constrain outbound requests to `https://run.xcrawl.com/v1/map` and reject redirects to unapproved origins so the authorization header cannot be forwarded inadvertently. 5. Keep the API key solely in the authorization header and ensure command output, error messages, and logs never print it. 6. Align the manifest permissions with the documented policy that only the minimum runtime permissions should be requested. 7. If the platform cannot enforce path- or endpoint-level restrictions, require explicit user approval before each filesystem read or network request involving credentials. A hardened declaration should expose only the minimum tools needed to read the XCrawl configuration and submit the documented HTTPS request. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Session Persistence

Medium
Category
Rogue Agent
Content
---
name: xcrawl-map
description: Use this skill for XCrawl map tasks, including site URL discovery, regex filtering, scope estimation, and crawl planning before full-site crawling.
allowed-tools: Bash(curl:*) Bash(node:*) Read Write Edit Grep
metadata: {"version":"1.0.2","openclaw":{"skillKey":"xcrawl-map","homepage":"https://www.xcrawl.com/","requires":{"localFiles":["~/.xcrawl/config.json"],"anyBins":["curl","node"]},"apiKeySource":"local_config"}}
---
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill instructs users to send site URLs and a bearer API credential to an external XCrawl service but does not clearly warn that user-provided targets and authentication data will leave the local environment. This creates a transparency and consent problem: users may unknowingly transmit sensitive internal URLs or reconnaissance targets to a third party.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
API_KEY="$(node -e "const fs=require('fs');const p=process.env.HOME+'/.xcrawl/config.json';const k=JSON.parse(fs.readFileSync(p,'utf8')).XCRAWL_API_KEY||'';process.stdout.write(k)")"

curl -sS -X POST "https://run.xcrawl.com/v1/map" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${API_KEY}" \
  -d '{"url":"https://example.com","filter":"/docs/.*","limit":2000,"include_subdomains":true,"ignore_query_parameters":false}'
Confidence
90% confidence
Finding
The cURL example sends data to an external service using a bearer token loaded from local config, transmitting the mapping target to XCrawl. While expected for this integration, it is still a real data egress path that can expose sensitive URLs, internal scope details, and account-linked usage if users are not clearly informed.

External Transmission

Medium
Category
Data Exfiltration
Content
const fs=require("fs");
const apiKey=JSON.parse(fs.readFileSync(process.env.HOME+"/.xcrawl/config.json","utf8")).XCRAWL_API_KEY;
const body={url:"https://example.com",filter:"/docs/.*",limit:3000,include_subdomains:true,ignore_query_parameters:false};
fetch("https://run.xcrawl.com/v1/map",{
  method:"POST",
  headers:{"Content-Type":"application/json",Authorization:`Bearer ${apiKey}`},
  body:JSON.stringify(body)
Confidence
90% confidence
Finding
This code performs an outbound HTTPS request to a third-party API and includes both the user-supplied URL and the API key in the request context. In a mapping/recon skill, that means potentially sensitive targets, internal hostnames, or confidential discovery scope can be disclosed externally if used without clear user consent and scope controls.

Static analysis

No suspicious patterns detected.