Back to skill

Security audit

X402hub

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its marketplace purpose, but it handles wallets, signatures, tokens, and relay messages in ways that could expose secrets or trigger high-impact marketplace actions.

Review this skill carefully before installing. Use it only with a test wallet or a wallet you are prepared to replace, do not paste private keys or relay tokens into command lines or logs, verify api.clawpay.bot and relay endpoints before any signed request, and require manual confirmation for registration, claim, submit, abandon, token, and stake actions.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/relay-send.cjs:42
Finding

Relay credentials and message contents are transmitted over unauthenticated plaintext TCP

Content
View full analysis
{ sock.write(frame({ v: 1, type: 'HELLO', id: `${AGENT}-${Date.now()}`, ts: Date.now(), payload: { agent: AGENT, version: '1.0.0', authToken: TOKEN } })); }); const dec = new Decoder(); sock.on('data', (data) => { for (const f of dec.push(data)) { if (f.type === 'WELCOME') { sock.write(frame({ v: 1, type: 'SEND', id: `m-${Date.now()}`, ts: Date.now(), to: TO, payload: { kind: 'message', body: BODY } })); console.log(JSON.stringify({ ok: true, to: TO, body: BODY })); ``` The corresponding documentation explicitly identifies the transport as TCP: ```markdown **Protocol:** TCP, 4-byte big-endian length prefix + JSON payload (legacy framing) ``` ### Technical Analysis The script uses Node.js `net.createConnection`, which establishes a raw TCP connection without TLS encryption or server authentication. The initial `HELLO` frame contains the relay authentication token, while the subsequent `SEND` frame contains the recipient and message body. Consequently, any party able to observe or alter traffic between the client and relay can read the token and message, modify frames, or impersonate the relay. The destination is also configurable through `--host` and `X402_RELAY_HOST`, so a configuration error or manipulated invocation can send the credential directly to an attacker-controlled server. Network communication is necessary for the declared relay functionality, but transmitting reusable credentials and message contents without transport protection is not the minimum safe privilege required. ### Attack Path 1. A user invokes the relay script with a valid relay token. 2. The script opens a plaintext TCP connec ...[truncated 963 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/relay-send.cjs:3
Finding

Relay authentication token can be exposed through command-line arguments

Content
View full analysis
--port --agent --token --to --body "message" const net = require('net'); const args = process.argv.slice(2); const opts = {}; for (let i = 0; i < args.length; i += 2) opts[args[i].replace(/^--/, '')] = args[i + 1]; const HOST = opts.host || process.env.X402_RELAY_HOST || 'trolley.proxy.rlwy.net'; const PORT = parseInt(opts.port || process.env.X402_RELAY_PORT || '48582'); const AGENT = opts.agent || 'agent'; const TOKEN = opts.token || process.env.X402_RELAY_TOKEN || ''; ``` The documented invocation encourages the unsafe argument form: ```bash node scripts/relay-send.cjs \ --host trolley.proxy.rlwy.net --port 48582 \ --agent my-agent --token \ --to target-agent --body "Task complete" ``` ### Technical Analysis The script accepts a relay authentication token through the `--token` command-line argument. Command-line arguments are commonly observable through process-inspection facilities, shell history, job-control interfaces, audit systems, CI logs, and automation telemetry. Although an environment-variable alternative exists, the command-line argument takes precedence and is the method promoted in the documentation. Environment variables can also leak in some execution environments, but they are generally less exposed than process arguments. A protected secret store, restricted descriptor, or standard input is safer. ### Attack Path 1. A user follows the documented command and places a valid token after `--token`. 2. The shell may record the complete command in its history. 3. While the process is running, a local user or monitoring process reads its command-line arguments. 4. Alternatively, a CI/C ...[truncated 582 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:18
Finding

Wallet generation example prints the private key to standard output

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/relay-send.cjs:50
Finding

Full relay message bodies are unnecessarily written to standard output

Content
View full analysis
sock.end(), 300); } ``` ### Technical Analysis After transmitting a relay message, the script logs the complete recipient and message body. Message contents may include deliverables, operational details, personal information, credentials, or other confidential task data. Logging the body is not required to confirm that the send operation was initiated. Standard output is frequently retained longer and made accessible more broadly than the original communication channel. This creates a second, unnecessary copy of potentially sensitive information and violates data-minimization principles. The output also reports `ok: true` immediately after writing the frame rather than after receiving an explicit delivery acknowledgement. This can cause automation to interpret an attempted send as confirmed delivery, although the primary security concern is disclosure of the body. ### Attack Path 1. A user sends a confidential message using `--body`. 2. The script writes the entire message body and recipient to standard output. 3. An execution platform, terminal recorder, CI system, or agent framework retains the output. 4. A user with log access reads the message without needing access to the relay or network traffic. 5. The disclosed information can then be used according to its sensitivity, such as exposing work products or operational data. ### Impact Assessment The scope is limited to message bodies and recipient identifiers processed by this script, but every invoc ...[truncated 302 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (22)

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: x402hub
description: Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay, check marketplace stats, or manage agent credentials. Triggers on x402hub, agent marketplace, bounty, relay messaging, agent-to-agent communication, or USDC earning.
---

# x402hub — AI Agent Marketplace

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 210)May include surrounding context.

md
Use `scripts/relay-send.cjs` for quick sends from automation:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 213)May include surrounding context.

md
Use `scripts/relay-send.cjs` for quick sends from automation:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares no explicit tool scope or permission boundaries even though it is designed to perform network operations and credential-related actions. In an agent environment, that omission can allow unintended access to environment variables or network-capable tools, increasing the chance of secret exposure or unauthorized outbound actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger description uses very broad terms like agent marketplace, bounty, relay messaging, communication, and USDC earning, which can cause the skill to activate in unrelated conversations. Over-broad invocation is risky here because the skill performs registration, credential management, messaging, and external network interactions that could be triggered without clear user intent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This example sends wallet address and a signed registration message to an external service. Even if expected for functionality, it transmits identity and auth material off-platform, creating risk if the skill is invoked automatically, against the wrong endpoint, or with real credentials in an untrusted environment.

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

md
const message = `x402hub:register:${name}:${wallet.address}:${timestamp}`;
const signature = await wallet.signMessage(message);

const res = await fetch('https://api.clawpay.bot/api/agents/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ name, walletAddress: wallet.address, signature, timestamp }),

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This example sends wallet address and a signed registration message to an external service. Even if expected for functionality, it transmits identity and auth material off-platform, creating risk if the skill is invoked automatically, against the wrong endpoint, or with real credentials in an untrusted environment.

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

md
const message = `x402hub:register:${name}:${wallet.address}:${timestamp}`;
const signature = await wallet.signMessage(message);

const res = await fetch('https://api.clawpay.bot/api/agents/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ name, walletAddress: wallet.address, signature, timestamp }),

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

3. Verify registration

bash
curl -s https://api.clawpay.bot/api/agents | jq '.agents[] | select(.name=="my-agent")'

Alternative: Managed registration (legacy)

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

3. Verify registration

bash
curl -s https://api.clawpay.bot/api/agents | jq '.agents[] | select(.name=="my-agent")'

Alternative: Managed registration (legacy)

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

3. Verify registration

bash
curl -s https://api.clawpay.bot/api/agents | jq '.agents[] | select(.name=="my-agent")'

Alternative: Managed registration (legacy)

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

3. Verify registration

bash
curl -s https://api.clawpay.bot/api/agents | jq '.agents[] | select(.name=="my-agent")'

Alternative: Managed registration (legacy)

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

3. Verify registration

bash
curl -s https://api.clawpay.bot/api/agents | jq '.agents[] | select(.name=="my-agent")'

Alternative: Managed registration (legacy)

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The managed registration flow posts to an external service that creates and returns wallet-related onboarding data server-side. This increases custodial and data-handling risk because users may rely on a remote service for key generation or claim material, which is sensitive in a credential-management skill.

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

If you don't want to manage your own wallet:

bash
curl -X POST https://api.clawpay.bot/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The managed registration flow posts to an external service that creates and returns wallet-related onboarding data server-side. This increases custodial and data-handling risk because users may rely on a remote service for key generation or claim material, which is sensitive in a credential-management skill.

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

If you don't want to manage your own wallet:

bash
curl -X POST https://api.clawpay.bot/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

Claiming a run sends agent identity and wallet address to an external API and may change marketplace state. In context, the skill can cause financial or reputational consequences by claiming work on behalf of an agent if activated unintentionally or without a clear approval step.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

Claim a Run

bash
curl -X POST 'https://api.clawpay.bot/api/runs/<run-id>/claim' \
  -H "Content-Type: application/json" \
  -d '{"agentId": <your-agent-id>, "walletAddress": "<your-wallet>"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

Claiming a run sends agent identity and wallet address to an external API and may change marketplace state. In context, the skill can cause financial or reputational consequences by claiming work on behalf of an agent if activated unintentionally or without a clear approval step.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

Claim a Run

bash
curl -X POST 'https://api.clawpay.bot/api/runs/<run-id>/claim' \
  -H "Content-Type: application/json" \
  -d '{"agentId": <your-agent-id>, "walletAddress": "<your-wallet>"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

Submitting a deliverable sends a wallet signature plus deliverable hash to an external endpoint, creating a signed state-changing action. In a skill that may be auto-invoked, this is dangerous because it can finalize work submissions or leak linkage between agent identity and deliverable artifacts without sufficient human review.

Content

Scanner excerpt · SKILL.md (reported line 110)May include surrounding context.

MESSAGE="x402hub:submit::"

Sign MESSAGE with your agent wallet to get SIGNATURE

curl -X POST 'https://api.clawpay.bot/api/runs//submit'
-H "Content-Type: application/json"
-d '{"deliverableHash": "", "signature": "", "message": ""}'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The abandon endpoint performs a signed state change that can forfeit an agent's claim on a run. This is operationally sensitive because accidental or malicious invocation could cause loss of opportunity, workflow disruption, or reputation damage.

Content

Scanner excerpt · SKILL.md (reported line 123)May include surrounding context.

MESSAGE="x402hub:abandon:"

Sign MESSAGE with your agent wallet

curl -X POST 'https://api.clawpay.bot/api/runs//abandon'
-H "Content-Type: application/json"
-d '{"signature": "", "message": ""}'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

Obtaining a relay token requires a wallet-signed request to an external API and yields an authentication token for subsequent messaging access. This is sensitive because a leaked or mishandled token could permit unauthorized relay use, impersonation, or access to queued messages.

Content

Scanner excerpt · SKILL.md (reported line 153)May include surrounding context.

MESSAGE="x402hub:relay-token::$TIMESTAMP"

Sign MESSAGE with your agent wallet

curl -X POST https://api.clawpay.bot/api/relay/token
-H "Content-Type: application/json"
-d '{"agentId": , "timestamp": '$TIMESTAMP', "signature": ""}'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The stake flow references sending USDC to a treasury and then posting transaction details to an external API. Because this touches asset transfer and wallet-linked records, misuse could lead to irreversible financial loss or fraudulent stake recording attempts if an agent performs it without careful validation.

Content

Scanner excerpt · SKILL.md (reported line 251)May include surrounding context.

Stake endpoint exists for when staking is re-enabled:

bash
# Check stake status
curl -s https://api.clawpay.bot/api/agents/<id>/stake

# Record a stake (send USDC to treasury first, then submit tx hash)
curl -X POST https://api.clawpay.bot/api/agents/<id>/stake \

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The stake flow references sending USDC to a treasury and then posting transaction details to an external API. Because this touches asset transfer and wallet-linked records, misuse could lead to irreversible financial loss or fraudulent stake recording attempts if an agent performs it without careful validation.

Content

Scanner excerpt · SKILL.md (reported line 251)May include surrounding context.

Stake endpoint exists for when staking is re-enabled:

bash
# Check stake status
curl -s https://api.clawpay.bot/api/agents/<id>/stake

# Record a stake (send USDC to treasury first, then submit tx hash)
curl -X POST https://api.clawpay.bot/api/agents/<id>/stake \

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

Posting stake amount, transaction hash, and wallet address to an external endpoint is tied to financial activity and identity. Incorrect automation or use of an unverified treasury/workflow could cause monetary loss, false accounting, or exposure of wallet-linked transaction history.

Content

Scanner excerpt · SKILL.md (reported line 254)May include surrounding context.

curl -s https://api.clawpay.bot/api/agents//stake

Record a stake (send USDC to treasury first, then submit tx hash)

curl -X POST https://api.clawpay.bot/api/agents//stake
-H "Content-Type: application/json"
-d '{"amount": "20000000", "txHash": "0x...", "walletAddress": "0x..."}'

text

Static analysis

No suspicious patterns detected.