跪拜 Guibai
← All articles
Backend · Programmer · Artificial Intelligence

A Tampermonkey Script, a Fake IBAN, and a Payment State Machine Bug Unlocked Free Claude Max 20x

By cxuanAI ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

The exploit didn't require hacking a server or forging a payment confirmation. It succeeded because the backend trusted a checkout-flow flag set by the client, accepted an unverified IBAN, and granted service before settlement. Any team integrating asynchronous payment methods inherits this same risk surface.

Summary

A short Tampermonkey script intercepted the `checkout_capabilities` API response and rewrote it to `cassia`, tricking the frontend into displaying a SEPA Debit payment form that was normally hidden. Users filled it with a randomly generated IBAN that passed format validation but pointed to no real bank account. The subscription system then upgraded accounts to the $200/month Max 20x tier immediately, treating the payment initiation as a completed transaction.

The exploit chain combined three failures: the backend trusted a client-supplied checkout flow value without re-verifying eligibility, the payment integration accepted a structurally valid but non-existent IBAN, and the subscription state machine conflated a `PROCESSING` debit status with settled funds. SEPA Direct Debit is asynchronous; rejections and returns can arrive days later, but by then users had already burned through hundreds of dollars' worth of API tokens.

Anthropic's response was an indiscriminate ban on all new accounts, not just those from the German region where SEPA is common. The script itself was dead within hours, but the incident exposed how a chain of mundane trust-boundary mistakes can produce a loss measured in the hundreds of millions when the asset being protected is token consumption.

Takeaways
Intercepting the `checkout_capabilities` response and rewriting `checkout_flow` to `cassia` was enough to expose a hidden SEPA Debit payment UI.
The backend accepted orders from the Cassia flow without re-checking whether the account was actually eligible for that checkout path.
A randomly generated IBAN passes structural and checksum validation but proves nothing about account existence, ownership, or funds.
SEPA Direct Debit is asynchronous: a `PROCESSING` or `submitted` status does not mean money has settled, and rejections can arrive later.
The subscription system granted Max 20x access as soon as the debit request was created, before any bank confirmation.
Anthropic's mitigation was a blanket ban on all new accounts, not a targeted block of the German region.
Conclusions

Calling this a frontend vulnerability understates it. The real failure was the backend treating a UI configuration flag as an authorization credential, a textbook CWE-602 violation.

Random IBAN generators were the fuse, not the bomb. The damage came from a payment state machine that treated 'debit initiated' as 'paid,' a mistake that would have eventually surfaced with any asynchronous payment method.

The speed of the ban wave suggests Anthropic lacked real-time anomaly detection on subscription grants versus settlement events. A system that can't correlate these two streams in near-real-time will always be vulnerable to this class of abuse.

The secondary market on Xianyu for exploited accounts shows that even a short-lived exploit window creates a financial incentive for resellers, amplifying the blast radius beyond the original script users.

Concepts & terms
CWE-602
A Common Weakness Enumeration entry describing systems that rely on client-side enforcement of server-side security. Any permission, price, or payment decision made in the browser must be re-verified by the server.
SEPA Direct Debit
A European payment method where a merchant initiates a bank account debit using a customer's IBAN and mandate. It is asynchronous: a submitted debit can be rejected or returned days later, so a 'processing' status does not equal settled funds.
IBAN
International Bank Account Number. A standardized identifier containing country code, check digits, bank code, and account number. Structural validation via MOD 97 confirms the format, not that the account exists or holds money.
Tampermonkey
A browser extension that runs user-defined JavaScript on specific web pages. It can intercept and modify network requests and responses, making it a powerful tool for altering frontend behavior without touching server-side code.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗