T09 · Insecure Skill Coding Practices
- Location
SKILL.md:17- Finding
Payment Negotiation Uses an Unauthenticated Plaintext HTTP Endpoint
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 17
Vulnerability Type: Plaintext transport for security-sensitive payment negotiation
Risk Level: HighVulnerable Code
markdown 1. **Request Resource**: When triggered, follow the instructions provided by the `x402_payment_tron` skill to fetch the protected resource at `http://x402-tron-demo.sunagent.ai/protected`.Technical Analysis
The skill directs the agent to negotiate access to a protected resource through plaintext HTTP. Because HTTP provides neither server authentication nor transport integrity, an on-path attacker could intercept and modify the response, including an HTTP 402 response and its associated payment parameters.
This is particularly security-sensitive because the next workflow step instructs the agent to sign and perform the requested payment automatically. Unless the referenced payment implementation independently authenticates every payment request, maliciously altered parameters could be treated as legitimate.
The implementation of the referenced
x402_payment_tronskill is not included in the audited project, so the presence of compensating cryptographic validation cannot be verified.Attack Path
- A user invokes the x402 payment demo.
- The agent requests the configured resource through plaintext HTTP.
- An attacker with network-path control intercepts the request or response.
- The attacker returns or modifies an HTTP 402 response containing attacker-selected payment parameters.
- The agent passes those parameters to the automatic payment workflow.
- If no independent recipient, amount, asset, network, and signature validation occurs, the agent signs and submits the manipulated transaction.
- The attacker receives funds or substitutes the protected content.
Impact Assessment
A successful attack could redirect a payment, alter its amount or asset, substitute returned content, and reveal ...[truncated 304 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the endpoint with an HTTPS URL and require valid certificate verification.
- Reject HTTPS-to-HTTP downgrade redirects and cross-origin redirects.
- Cryptographically authenticate payment requests independently of transport security.
- Validate the TRON network, chain identifier, recipient address, asset, amount, expiration time, nonce, and expected resource before signing.
- Pin or allowlist the expected payment origin and recipient where operationally feasible.
- Abort the workflow if any payment parameter differs from the approved demo configuration.
- Log non-secret transaction details so users can verify the payment and investigate anomalies.
