- Home
- Skills
- Web3 & Crypto
- X402 Security Audit
X402 Security Audit
Security audit checklist for x402 and pay-per-call HTTP payment implementations.
$15
X402 Security Audit
Example session with this skill installed
Audit this x402 payment handler. It verifies the EIP-712 signature, checks the amount is > 0, and logs the full payment-signature to CloudWatch for debugging.
- Read your context and instructions
- Compiled the x402 security audit
I have audited the x402 payment handler logic provided. The implementation contains critical vulnerabilities related to amount verification and data privacy.
Security Audit Findings
| Severity | Category | Finding | Recommendation |
|---|---|---|---|
| CRITICAL | Payment Verification | Amount check is > 0 instead of ≥ quoted price. | Update check to strictly enforce amount >= price. |
| HIGH | Trust Boundaries | Logging full payment-signature to CloudWatch. | Remove secret/signature logging; ensure only public payment info is logged. |
| HIGH | Verification | Missing network/chain ID allowlist check. | Pin the network ID to prevent cross-chain replay attacks. |
| MEDIUM | Verification | Asset contract resolved by symbol, not address. | Hardcode or pin the specific asset contract address (e.g., USDC on Base). |
| MEDIUM | Replay | No check for maxTimeoutSeconds or expiration. | Reject signatures where the timeout has expired to prevent delayed replays. |
Evidence Collection Requirements
- Underpayment Test: Attempt a call with 0.000001 units of the asset. The server must return 402.
- Log Audit: Review the last 50 CloudWatch entries to ensure no private keys or internal wallet addresses were leaked during 500 errors.
- Cross-Chain Replay: Attempt to use a valid Polygon signature on the Base deployment. It must be rejected.
Next steps
- Patch the amount verification logic to match the quoted price immediately.
- Implement a nonce-tracking ledger to ensure exactly-once execution.
- Sanitize the logging middleware to exclude the
payment-signaturefield.
Connects securely to your tools. The creator never sees your data.
About this skill
Payment flows are the highest-stakes code in agent-facing APIs. A single oversight in signature verification or chain validation leads to direct financial loss. This skill provides a rigorous security audit framework for x402 and pay-per-call HTTP payment implementations.
What it does
- Payment Verification checks that signatures are cross-referenced against request schemes, networks, and pinned asset contracts.
- Replay Protection audits nonce uniqueness and ensures settled payloads cannot authorize duplicate calls.
- Trust Boundary Analysis scans for internal wallet data or sensitive logic leakage in public 402 headers and bodies.
- Failure Path Auditing evaluates how the system handles scenarios where settlement succeeds but the handler fails.
- Facilitator Risk Assessment reviews the verification guarantees of third-party payment facilitators and downtime policies.
How it works
- Request Audit: Run the skill against your current x402 implementation or code snippets.
- Severity Analysis: The skill categorizes findings into a five-level severity ranking, prioritizing direct theft risks.
- Evidence Collection: It generates a list of required evidence, including testnet payment traces and deliberate failure logs.
Frameworks & tools
This skill is designed for x402 (HTTP 402) payment standards, EIP-712 signature verification, and Ethereum-compatible blockchains. It works with any web framework implementing pay-per-call headers.
Why this beats prompting it yourself
Generic security prompts often miss the nuances of decentralized payment flows, such as asset contract pinning or facilitator trust assumptions. This skill uses a specialized x402 checklist that addresses the specific ways agent-to-agent payments fail.
Use cases
- Reviewing a paid API implementation before production deployment.
- Investigating a suspicious incident or potential payment bypass.
- Hardening an existing pay-per-call integration against replay attacks.
- Benchmarking a new payment facilitator's verification logic.
Known limitations
Requires manual review of logic for off-chain credit systems. Does not perform live on-chain transaction monitoring.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Requires
Nothing to install.
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
New in Web3 & Crypto
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Web3 & Crypto.