T09 · Insecure Skill Coding Practices
- Location
scripts/fetch-with-payment.ts:44- Finding
Automatic Payment Requests Do Not Enforce a Mandatory Spending Limit or Destination Allowlist
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This payments skill is not clearly malicious, but it needs Review because it can spend funds through broad x402 payment calls and also creates and reads disposable email accounts while storing their credentials locally.
Install only after reviewing whether you want an agent to spend from a thirdweb-backed wallet and create/read disposable inboxes. Use a low-funded wallet, require explicit approval for every payment, set and enforce spending caps outside this skill, avoid arbitrary x402 URLs, and do not use the disposable-email feature for sensitive accounts unless credential storage is fixed.
scripts/fetch-with-payment.ts:44Automatic Payment Requests Do Not Enforce a Mandatory Spending Limit or Destination Allowlist
scripts/create-email.ts:24Disposable Email Passwords and Bearer Tokens Are Persisted in a Plaintext File Without Restrictive Permissions
scripts/create-email.ts:65Email Authentication Passwords Are Generated with a Non-Cryptographic PRNG and Exposed to Process Output
SKILL.md:270Documented npx Execution Can Download and Run Unpinned Third-Party Code with Access to Skill Secrets
The skill claims to handle x402 micropayments, but also includes unrelated disposable email account creation, token retrieval, inbox access, and local credential storage. This scope expansion can mislead agents into performing account-creation and credential-handling actions the user did not authorize under the guise of a payments skill.
The skill claims to handle x402 micropayments, but also includes unrelated disposable email account creation, token retrieval, inbox access, and local credential storage. This scope expansion can mislead agents into performing account-creation and credential-handling actions the user did not authorize under the guise of a payments skill.
The skill claims to handle x402 micropayments, but also includes unrelated disposable email account creation, token retrieval, inbox access, and local credential storage. This scope expansion can mislead agents into performing account-creation and credential-handling actions the user did not authorize under the guise of a payments skill.
The skill claims to handle x402 micropayments, but also includes unrelated disposable email account creation, token retrieval, inbox access, and local credential storage. This scope expansion can mislead agents into performing account-creation and credential-handling actions the user did not authorize under the guise of a payments skill.
The skill claims to handle x402 micropayments, but also includes unrelated disposable email account creation, token retrieval, inbox access, and local credential storage. This scope expansion can mislead agents into performing account-creation and credential-handling actions the user did not authorize under the guise of a payments skill.
The skill claims to handle x402 micropayments, but also includes unrelated disposable email account creation, token retrieval, inbox access, and local credential storage. This scope expansion can mislead agents into performing account-creation and credential-handling actions the user did not authorize under the guise of a payments skill.
The skill claims to handle x402 micropayments, but also includes unrelated disposable email account creation, token retrieval, inbox access, and local credential storage. This scope expansion can mislead agents into performing account-creation and credential-handling actions the user did not authorize under the guise of a payments skill.
Referenced artifact was not completely inspected
npx ts-node scripts/discover-services.ts
Referenced artifact was not completely inspected
npx ts-node scripts/discover-services.ts
Referenced artifact was not completely inspected
npx ts-node scripts/discover-services.ts
Referenced artifact was not completely inspected
npx ts-node scripts/discover-services.ts
The instructions explicitly recommend adding THIRDWEB_SECRET_KEY to .env.local or a shell profile, normalizing storage of a payment-capable secret in plaintext developer-managed locations. In the context of a micropayments skill, compromise of this credential could enable unauthorized API usage, wallet control, spending, and downstream financial abuse.
"step": 2,
"action": "Set environment variable",
"command": "export THIRDWEB_SECRET_KEY='your-key-here'",
"description": "Add to .env.local or shell profile"
},
{
"step": 3,
The file implements disposable email account creation and inbox management, which is unrelated to the stated skill purpose of x402 micropayments. Capability mismatch is dangerous because it can hide unauthorized account creation, OTP interception, and identity-abuse functionality inside a package users would not reasonably expect to manipulate email accounts.
The code actively creates disposable addresses, authenticates to a third-party mailbox service, refreshes tokens, lists messages, and reads message contents. In the context of a micropayments skill, this unjustified capability can be abused to register throwaway accounts and capture verification emails or recovery links, significantly expanding the skill's power beyond payments into covert account operations.
The skill requires sensitive capabilities (env access to THIRDWEB_SECRET_KEY and unrestricted network access) but does not declare an explicit tool scope such as permissions or allowed-tools. That makes the operational boundary ambiguous and increases the chance an agent can use broader tools than intended while handling payments and external API calls.
The skill promotes automatic payment flows and opening funding links but does not clearly warn that these actions may spend real funds or send users to third-party payment pages. In an autonomous-agent context, that can lead to unintended purchases or social-engineering-like redirection under the authority of the skill.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Query the Bazaar to see what's available (no auth required)
curl -s "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources?type=http&limit=50"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Query the Bazaar to see what's available (no auth required)
curl -s "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources?type=http&limit=50"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Query the Bazaar to see what's available (no auth required)
curl -s "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources?type=http&limit=50"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Query the Bazaar to see what's available (no auth required)
curl -s "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources?type=http&limit=50"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Query the Bazaar to see what's available (no auth required)
curl -s "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources?type=http&limit=50"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
```bash
# Query the Bazaar to see what's available (no auth required)
curl -s "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources?type=http&limit=50"
```
## Prerequisites
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
**Discovery tips:**
- Check for `x402.` subdomain (e.g., `x402.browserbase.com`)
- Check for `/x402/` in the path (e.g., `/v1/x402/search`)
- Hit the x402 root URL for endpoint listing (e.g., `curl https://x402.browserbase.com/`)
## Core Workflow
This example sends the sensitive THIRDWEB_SECRET_KEY to thirdweb to create a server wallet. While this may be intended, it is high-trust external transmission of a secret-bearing request and can create managed wallets capable of spending funds if an agent executes it without strict authorization.
Use the thirdweb API directly (recommended):
curl -s -X POST https://api.thirdweb.com/v1/wallets/server \
-H "Content-Type: application/json" \
-H "x-secret-key: $THIRDWEB_SECRET_KEY" \
-d '{"identifier": "x402-agent-wallet"}'
This call transmits a secret-authenticated payment request to thirdweb that can cause paid actions against Browserbase. Because it combines external transmission, authenticated access, and monetary effect, it is more dangerous than ordinary network usage in this skill context.
# Browserbase - Create browser session
curl -s -X POST "https://api.thirdweb.com/v1/payments/x402/fetch?url=https://x402.browserbase.com/browser/session/create&method=POST" \
-H "Content-Type: application/json" \
-H "x-secret-key: $THIRDWEB_SECRET_KEY" \
-d '{"browserSettings": {"viewport": {"width": 1920, "height": 1080}}}'
Detected: suspicious.exposed_secret_literal