T09 · Insecure Skill Coding Practices
- Location
src/paywall.py:92- Finding
Payment Verification Accepts Unrelated Successful Transactions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent payment-layer prototype, but its core payment verification and automatic payment behavior are unsafe for real-money use without careful review.
Do not install this for production or autonomous real-money payments unless payment verification is fixed to validate the actual USDC transfer details, dependencies fail closed, transaction replay is durable, and automatic spending requires explicit approval and trusted recipients.
src/paywall.py:92Payment Verification Accepts Unrelated Successful Transactions
src/paywall.py:85Missing Requests Dependency Causes Fail-Open Payment Authentication
src/paywall.py:144Replay Protection Is Process-Local and Non-Atomic
SKILL.md:249Installation Instructions Use Unpinned Third-Party Packages
If the verifier accepts generic transaction success or any well-formed tx hash in fallback mode rather than validating the specific USDC transfer details, an attacker can bypass payment by submitting an unrelated successful transaction hash. Because this skill is explicitly a payment gate, weak verification defeats the core security boundary and can enable unauthorized access to paid capabilities at scale.
If the verifier accepts generic transaction success or any well-formed tx hash in fallback mode rather than validating the specific USDC transfer details, an attacker can bypass payment by submitting an unrelated successful transaction hash. Because this skill is explicitly a payment gate, weak verification defeats the core security boundary and can enable unauthorized access to paid capabilities at scale.
The verifier claims to perform on-chain USDC payment validation, but it only checks that a transaction receipt exists and that the transaction succeeded. It does not verify that the transaction interacted with the USDC contract, transferred funds to the expected recipient, came from the expected sender, or transferred the expected amount, so any unrelated successful transaction hash on the chain can unlock paid functionality.
If the requests dependency is unavailable, the fallback treats any 66-character hex string beginning with 0x as a valid payment proof. This completely bypasses payment enforcement, allowing an attacker to fabricate a fake tx hash and receive paid service without sending funds.
The skill advertises code and operational capabilities involving environment access, file writing, and network use, but does not declare any explicit tool scope or permissions boundary. In an agent ecosystem, this increases the risk of over-privileged execution because consumers cannot accurately assess what the skill may access or transmit before enabling it.
The client example emphasizes automatic payment handling for real USDC transfers without a prominent warning, confirmation step, or safer dry-run pattern. In agentic environments, this can lead to unintended autonomous spending if users copy the example directly or if higher-level agents invoke it without strong purchase controls.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Call a paid skill — handles payment automatically
result = client.call(
url="https://api.example.com/api/analyze",
method="POST",
json={"metrics": {...}},
max_price=0.10 # Won't pay more than $0.10
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
subscription_price=9.99, # $9.99/month subscription_duration_days=30 )
## Ledger
The manifest describes a meta-skill that wraps other skills with per-call pricing and on-chain payment verification, but this file implements a standalone local ledger with revenue analytics, payer history lookup, subscription management, and CSV export. Those operations are broader product capabilities than simply charging per call and verifying payment, so the code behavior exceeds the manifest's stated scope.
The module can export full payment records, including payer identifiers and transaction metadata, to an arbitrary filesystem path without any access control or path restrictions. In an agent skill context, if untrusted callers can influence the output path or trigger exports, this creates a data exfiltration channel and can overwrite files accessible to the process.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"id": 1,
}
try:
resp = requests.post(self.rpc_url, json=payload, timeout=10)
receipt = resp.json().get("result")
if not receipt or receipt.get("status") != "0x1":
return False
The client automatically sends on-chain payment after receiving a 402 response, with no explicit user confirmation step beyond a max_price threshold. In agent or autonomous workflows, this can cause unintended spending to arbitrary recipients returned by an endpoint, especially if the endpoint is malicious, compromised, or misconfigured.
No suspicious patterns detected.