T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:17
- Finding
- Payment Negotiation Uses an Unauthenticated Plaintext HTTP Endpoint## Vulnerability Details **File Location**: `SKILL.md`, line 17 **Vulnerability Type**: Plaintext transport for security-sensitive payment negotiation **Risk Level**: High ### Vulnerable 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_tron` skill is not included in the audited project, so the presence of compensating cryptographic validation cannot be verified. ### Attack Path 1. A user invokes the x402 payment demo. 2. The agent requests the configured resource through plaintext HTTP. 3. An attacker with network-path control intercepts the request or response. 4. The attacker returns or modifies an HTTP 402 response containing attacker-selected payment parameters. 5. The agent passes those parameters to the automatic payment workflow. 6. If no independent recipient, amount, asset, network, and signature validation occurs, the agent signs and submits the manipulated transaction. 7. 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
- ## 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.
