Back to skill

Security audit

ClawMarket - AI Agent Marketplace

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent ClawMarket client, but it enables financial marketplace actions and can send an API key to arbitrary custom endpoints without enough safety controls.

Review before installing or using. Only run authenticated commands against a trusted HTTPS ClawMarket endpoint, do not set CLAWMARKET_URL from untrusted projects or wrappers, and require explicit human confirmation before registering, creating listings, placing orders, sending crypto, or buying subdomains.

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
clawmarket-cli.sh:5
Finding
API Credential Disclosure Through Unrestricted Custom Base URL<![CDATA[ ## Vulnerability Details **File Location**: `clawmarket-cli.sh`, lines 5–9 **Vulnerability Type**: Unvalidated endpoint override leading to credential disclosure **Risk Level**: High ### Vulnerable Code ```bash BASE_URL="${CLAWMARKET_URL:-https://market.aladdn.app/api}" API_KEY="${CLAWMARKET_API_KEY:-}" headers=(-H "Content-Type: application/json") [ -n "$API_KEY" ] && headers+=(-H "X-API-Key: $API_KEY") ``` ### Technical Analysis The CLI permits `CLAWMARKET_URL` to replace the trusted production API endpoint with an arbitrary URL. It does not validate the URL scheme, hostname, port, or path before constructing the shared request headers. When `CLAWMARKET_API_KEY` is set, the credential is added to requests regardless of their destination. Consequently, an attacker who can influence the process environment, a wrapper script, shell initialization configuration, CI/CD variables, or command-launch instructions can redirect authenticated requests to an attacker-controlled server. The override can also use plaintext HTTP, exposing the API key to network interception. The custom endpoint capability may be useful for legitimate testing, but forwarding production credentials to arbitrary origins exceeds the minimum privileges required for normal marketplace operation. ### Attack Path 1. The victim has a valid API key in `CLAWMARKET_API_KEY`. 2. An attacker causes `CLAWMARKET_URL` to reference an attacker-controlled endpoint, for example through a malicious wrapper, poisoned environment configuration, or deceptive execution instructions. 3. The victim invokes an authenticated operation such as `sell`, `buy`, `order`, or `domain-buy`. 4. The script constructs the `X-API-Key` header without checking the destination. 5. `curl` sends the API key to the attacker-controlled server. 6. The attacker captures and reuses the key against the legitimate ClawMarket API. ### Impact Assessment Successful exploitation discloses the victim's ClawMarket API key. The ...[truncated 562 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin authenticated production requests to `https://market.aladdn.app/api`. 2. Parse and validate any configurable endpoint before use: - Require HTTPS. - Allow only explicitly approved hostnames and ports. - Reject embedded credentials, unexpected schemes, and malformed URLs. 3. Attach `X-API-Key` only when the parsed destination exactly matches a trusted allowlisted origin. 4. If custom endpoints are needed for development, require an explicit opt-in flag such as `CLAWMARKET_ALLOW_CUSTOM_URL=1`. 5. Do not forward production credentials when custom-endpoint mode is enabled; require a separate development credential variable. 6. Configure `curl` with secure failure behavior, such as `--fail-with-body --show-error`, and explicitly constrain allowed protocols using `--proto '=https'`. 7. Document that environment variables affecting security-sensitive destinations must not be accepted from untrusted wrappers, repositories, or CI configuration. A safe design should independently validate the destination before creating or attaching authentication headers. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (15)

External Script Fetching

High
Category
Supply Chain
Content
-d "{\"name\":\"$2\",\"email\":\"$3\"}"
    ;;
  browse|listings)
    curl -s "$BASE_URL/listings${2:+?search=$2}" | python3 -m json.tool 2>/dev/null || cat
    ;;
  categories)
    curl -s "$BASE_URL/categories" | python3 -m json.tool 2>/dev/null || cat
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
curl -s "$BASE_URL/listings${2:+?search=$2}" | python3 -m json.tool 2>/dev/null || cat
    ;;
  categories)
    curl -s "$BASE_URL/categories" | python3 -m json.tool 2>/dev/null || cat
    ;;
  agents)
    curl -s "$BASE_URL/agents${2:+?search=$2}" | python3 -m json.tool 2>/dev/null || cat
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
curl -s "$BASE_URL/categories" | python3 -m json.tool 2>/dev/null || cat
    ;;
  agents)
    curl -s "$BASE_URL/agents${2:+?search=$2}" | python3 -m json.tool 2>/dev/null || cat
    ;;
  listing)
    curl -s "$BASE_URL/listings/$2" | python3 -m json.tool 2>/dev/null || cat
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
curl -s "$BASE_URL/agents${2:+?search=$2}" | python3 -m json.tool 2>/dev/null || cat
    ;;
  listing)
    curl -s "$BASE_URL/listings/$2" | python3 -m json.tool 2>/dev/null || cat
    ;;
  sell)
    # clawmarket-cli sell "Title" "Description" 25.00 "Development"
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
;;
  sell)
    # clawmarket-cli sell "Title" "Description" 25.00 "Development"
    curl -s -X POST "$BASE_URL/listings" "${headers[@]}" \
      -d "{\"title\":\"$2\",\"description\":\"$3\",\"price\":{\"amount\":$4,\"currency\":\"USDT\"},\"category\":\"$5\",\"type\":\"service\",\"deliveryType\":\"digital\"}"
    ;;
  buy)
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
;;
  chat)
    shift
    curl -s -X POST "$BASE_URL/bot/message" "${headers[@]}" \
      -d "{\"message\":\"$*\"}"
    ;;
  domain-check)
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
curl -s "$BASE_URL/domains/check/$2" | python3 -m json.tool 2>/dev/null || cat
    ;;
  domain-buy)
    curl -s -X POST "$BASE_URL/domains/provision" "${headers[@]}" \
      -d "{\"subdomain\":\"$2\"${3:+,\"targetIp\":\"$3\"}}"
    ;;
  health)
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill documents shell-based HTTP interactions but declares no explicit tool scope or allowed tools, creating a mismatch between stated permissions and actual capability. In an agent environment, this can lead to unintended shell/network execution paths and makes it harder for operators to constrain outbound actions safely.

External Transmission

Medium
Category
Data Exfiltration
Content
### 1. Register Your Agent

```bash
curl -X POST https://market.aladdn.app/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Bot",
Confidence
84% confidence
Finding
The skill instructs agents to send registration data such as name, email, and location to an external service. While expected for the marketplace use case, this is still an external data transmission path that can expose personal or identifying information to a third party if users are not informed and consent is not obtained.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill promotes TRC20 USDT payments and automatic escrow release but does not clearly warn that crypto transfers are irreversible, network-specific, and can result in permanent loss if mis-sent or if disputes are not raised before auto-release. In a marketplace workflow, an agent could initiate or guide a user into financially risky actions without adequate consent or safety friction.

External Transmission

Medium
Category
Data Exfiltration
Content
case "$1" in
  register)
    curl -s -X POST "$BASE_URL/auth/register" "${headers[@]}" \
      -d "{\"name\":\"$2\",\"email\":\"$3\"}"
    ;;
  browse|listings)
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script performs POST requests for registration using supplied personal data, and similar state-changing commands elsewhere create listings, orders, chats, and domain provisions. While the usage text names the commands, there is no inline confirmation prompt or user-facing disclosure at the point of execution that these commands will transmit data to a remote server and may create persistent marketplace resources.

External Transmission

Medium
Category
Data Exfiltration
Content
;;
  sell)
    # clawmarket-cli sell "Title" "Description" 25.00 "Development"
    curl -s -X POST "$BASE_URL/listings" "${headers[@]}" \
      -d "{\"title\":\"$2\",\"description\":\"$3\",\"price\":{\"amount\":$4,\"currency\":\"USDT\"},\"category\":\"$5\",\"type\":\"service\",\"deliveryType\":\"digital\"}"
    ;;
  buy)
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
;;
  chat)
    shift
    curl -s -X POST "$BASE_URL/bot/message" "${headers[@]}" \
      -d "{\"message\":\"$*\"}"
    ;;
  domain-check)
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
curl -s "$BASE_URL/domains/check/$2" | python3 -m json.tool 2>/dev/null || cat
    ;;
  domain-buy)
    curl -s -X POST "$BASE_URL/domains/provision" "${headers[@]}" \
      -d "{\"subdomain\":\"$2\"${3:+,\"targetIp\":\"$3\"}}"
    ;;
  health)
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.