Back to skill

Security audit

X2c Publish

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly transparent about publishing to X2C, but it also enables real wallet operations and sends the API key to a configurable endpoint without enough guardrails.

Review before installing. Use a narrowly scoped X2C API key, pin X2C_API_BASE_URL to the official HTTPS API origin, and do not run claim, swap, or withdrawal commands unless the agent shows the amount, asset, destination address, and API origin for explicit approval immediately before execution.

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
SKILL.md:44
Finding

Configurable API Endpoint Can Exfiltrate the X2C API Key

Content
View full analysis
` ### Get Categories ```bash curl -m 60 -X POST "$X2C_API_BASE_URL" \ -H "Content-Type: application/json" \ -H "X-API-Key: $X2C_API_KEY" \ -d '{"action": "distribution/categories", "lang": "zh-CN"}' ``` ``` The same pattern is repeated for the distribution and wallet API operations at lines 62–65, 89–92, 112–115, 124–127, 139–142, 150–153, 160–163, 170–173, 180–183, and 191–194. ### Technical Analysis The Skill obtains the destination URL directly from the configurable `X2C_API_BASE_URL` environment variable and attaches the sensitive `X2C_API_KEY` header to requests sent to that destination. No hostname, scheme, port, or origin validation is specified. Although the documentation claims that the variable defaults to a production endpoint, the reviewed project does not define a concrete default URL or enforce an approved origin. Consequently, an attacker who can influence the Agent's environment or Skill configuration can redirect authenticated requests to an attacker-controlled server. This is a credential-exfiltration flaw caused by combining an untrusted or insufficiently constrained endpoint with a sensitive authentication header. ### Attack Path 1. An attacker gains the ability to influence environment variables or the OpenClaw Skill configuration. 2. The attacker sets `X2C_API_BASE_URL` to an HTTPS endpoint under their control. 3. A user asks the Agent to perform a documented distribution or wallet operation. 4. The Agent follows the Skill instructions and executes `curl` against the attacker-controlled URL. ...[truncated 1019 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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)

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 · SKILL.md (reported line 19)May include surrounding context.

md
## Critical Rules

- Complete ALL workflow steps in order — never skip steps
- Always add timeout to curl commands: `-m 60`
- NEVER retry failed requests — report error and ask user
- Check project status before publishing to avoid duplicates
- Cover URL must be an image (jpg/png/webp), never a video URL

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 · SKILL.md (reported line 130)May include surrounding context.

Query Status

bash
curl -m 60 -X POST "$X2C_API_BASE_URL" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $X2C_API_KEY" \
  -d '{"action": "distribution/query", "project_id": "uuid"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill documents wallet operations such as claim, swap, and withdraw without requiring explicit user confirmation, risk disclosure, or warnings that these actions may be irreversible and transfer real assets. In an agent setting, this increases the chance of accidental financial loss, unauthorized withdrawals, or users invoking sensitive actions without understanding the consequences.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Get Categories example hard-codes "lang": "zh-CN" in the request, which imposes a specific locale in the skill instructions. The file does not offer a user choice or explain that the locale is region-specific and justified, so this is a natural-language policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.