Bypass R2 payment screen
The R2 subscription activation did not properly check for a valid payment method, so a user could enable the subscription by clicking the activation button before the payment field loaded or by sending a direct API request. This let an attacker bypass the payment requirement and activate R2 without a valid payment method.
- Triaged in 41 hours
- Fixed in 37 days
- Paid in 30 days
- Disclosed after 53 days
Summary by the program
Cloudflare's object storage product, R2, requires customers to have a valid payment method on file in order to activate the subscription. Due to insufficient access control checks, it was possible to bypass this requirement and enable the R2 subscription without having a valid payment method stored. Cloudflare's engineering team fixed the issue by implementing stricter access control methods around subscription enablement.
Summary by the researcher
I discovered that if you clicked Add R2 subscription to my account fast enough - before the Payment field loads - it would bypass R2's requirement to add a payment method to your account to prevent abuse. It also allowed you to bypass this by just sending an API request to the R2 signup endpoint.
What the report shows
Cloudflare R2 is an object storage product that requires a customer to have a valid payment method on file before the subscription can be activated. The researcher found that this requirement could be skipped, and the subscription enabled without any payment method stored.
The bypass worked in two ways. The first was a race in the user interface: if you clicked Add R2 subscription to my account quickly enough, before the Payment field had loaded, the subscription was enabled anyway. The second was simpler and did not depend on timing at all: sending an API request directly to the R2 signup endpoint achieved the same result.
The report does not include the endpoint path, the request method, any parameters or headers, or the server responses. The researcher's own summary links to an external write-up at https://stealing.info/cloudflare-r2-payment-bypass/ for further detail, but nothing from that page is reproduced here.
Cloudflare's engineering team fixed the issue by implementing stricter access control checks around subscription enablement. The report was rated medium severity and a bounty of 350.00 USD was paid. The weakness was classified as improper restriction of authentication attempts.
Root cause
The report points to insufficient access control checks on the subscription enablement path. The report attributes the bypass to insufficient access control checks around subscription enablement, without describing where the check was implemented. The UI race and the direct API call both enabled the subscription without a payment method, which the report attributes to insufficient access control checks. That reading is likely, since the report describes the behaviour but does not show the server-side logic.
Impact
An attacker could activate the R2 subscription without a valid payment method on file, which is exactly the abuse control the requirement exists to prevent. The report frames this as bypassing the payment requirement that guards against abuse; it does not describe any further consequence, such as access to other accounts' data or use of storage beyond what a paying customer would get.
How this kind of bug works
Many products gate a paid or abuse-prone feature behind a prerequisite: a payment method, an identity verification step, a completed onboarding form. The check is often implemented in the front end because that is where the user is guided through the flow. The page loads, fetches the prerequisite state, and only then enables the action button or submits the form.
That design fails whenever the server trusts the client to have performed the check. Two things follow. First, timing: if the action can be triggered before the prerequisite state has loaded, the client-side guard has not run yet, and the request goes out regardless. Second, direct invocation: if the endpoint that creates the subscription does not itself re-check the prerequisite, anyone who can send that request, with a session and the right parameters, skips the UI entirely.
The general lesson is that every state-changing endpoint must enforce its own preconditions. Client-side gating is a usability feature, not a security control. Defences are server-side re-validation of the prerequisite at the moment of the state change, ideally inside the same transaction that creates the subscription, plus idempotency and ordering checks so that a request arriving out of sequence is rejected rather than processed.
How to test for it
- Map the gated feature. Identify actions that require a prerequisite: enabling a paid plan, starting a trial, creating a resource that costs money, unlocking a feature after verification. Note the endpoint each action calls, using the browser's developer tools.
- Establish a clean baseline. With an account that lacks the prerequisite, confirm the UI blocks the action and record the exact request the UI would send if it were allowed.
- Try the race. Reload the page and trigger the action as early as possible, before the prerequisite state has loaded. Repeat with throttled network conditions and with the prerequisite request blocked or delayed in a proxy, so the window is wide and reproducible.
- Try the direct request. Replay the recorded request from step 2 with a valid session, without ever completing the prerequisite. Vary the body: omit the payment or verification fields, send them empty, or send stale values from another account you control.
- Check the result server-side, not just in the UI. Confirm whether the subscription or resource actually exists by querying the account state or the relevant API, and check whether billing or usage records were created.
A positive result is a state change that persists: the feature is active, the resource exists, and the prerequisite is still absent. A response that merely looks successful but leaves the account unchanged is not a finding. Common false positives are cached UI state that shows the feature as enabled while the backend refused it, requests that were actually rejected but rendered optimistically, and trials that legitimately do not require a payment method. Always verify through a second, independent read of the account state.
How it is fixed
The standard fix is to enforce the prerequisite on the server at the point of the state change: before creating the subscription, look up the account's payment method or verification status and reject the request if it is missing. The check should be part of the same transaction as the creation, so it cannot be raced. Endpoints should also validate that the request is arriving in a valid sequence, and the client should treat the server response as the source of truth rather than assuming success. Where a prerequisite is expensive to check, cache the result server-side, not in the browser.
Hunting notes
This class of bug tends to hide in flows with a visible prerequisite step: checkout and plan upgrades, trial activation, identity or KYC gates, invitation limits, and features unlocked after onboarding. It is especially common where the UI is a multi-step wizard, because each step is a separate request and the final one is often the least guarded.
Useful recon signals are endpoints whose names suggest creation or activation of a paid resource, parameters that carry plan or payment identifiers, and front-end code that conditionally enables a button based on a fetched flag. Watching which requests fire during a normal, successful flow tells you what the server expects; replaying the final request without the earlier steps tells you whether it checks.
To get a report accepted, show the prerequisite is genuinely absent after the action, demonstrate the resulting state change with a second read, and keep the reproduction minimal: one account, one request or one timing window. Explain the abuse the prerequisite was meant to prevent, and avoid overstating impact beyond what you can demonstrate.
What happened, in plain words
Cloudflare R2 is a product for storing files (object storage). To use it, a customer must have a valid payment method on file before the subscription can be activated. The researcher found that this requirement could be skipped, and the subscription enabled without any payment method stored.
The bypass worked in two ways. The first was a race in the user interface: if you clicked Add R2 subscription to my account quickly enough, before the Payment field had loaded, the subscription was enabled anyway. The second was simpler and did not depend on timing at all: sending an API request directly to the R2 signup endpoint achieved the same result.
The report does not include the endpoint path, the request method, any parameters or headers, or the server responses. The researcher's own summary links to an external write-up at https://stealing.info/cloudflare-r2-payment-bypass/ for further detail, but nothing from that page is reproduced here.
Cloudflare's engineering team fixed the issue by implementing stricter access control checks around subscription enablement. The report was rated medium severity and a bounty of 350.00 USD was paid. The weakness was classified as improper restriction of authentication attempts.
Root cause
The report points to insufficient access control checks on the subscription enablement path. The report attributes the bypass to insufficient access control checks around subscription enablement, without describing where the check was implemented. The UI race and the direct API call both enabled the subscription without a payment method, which the report attributes to insufficient access control checks. That reading is likely, since the report describes the behaviour but does not show the server-side logic.
Impact
An attacker could activate the R2 subscription without a valid payment method on file, which is exactly the abuse control the requirement exists to prevent. The report frames this as bypassing the payment requirement that guards against abuse; it does not describe any further consequence, such as access to other accounts' data or use of storage beyond what a paying customer would get.
How this kind of bug works
Many products gate a paid or abuse-prone feature behind a prerequisite: a payment method, an identity verification step, a completed onboarding form. The check is often implemented in the front end because that is where the user is guided through the flow. The page loads, fetches the prerequisite state, and only then enables the action button or submits the form.
That design fails whenever the server trusts the client to have performed the check. Two things follow. First, timing: if the action can be triggered before the prerequisite state has loaded, the client-side guard has not run yet, and the request goes out regardless. Second, direct invocation: if the endpoint that creates the subscription does not itself re-check the prerequisite, anyone who can send that request, with a session and the right parameters, skips the UI entirely.
The general lesson is that every state-changing endpoint must enforce its own preconditions. Client-side gating is a usability feature, not a security control. Defences are server-side re-validation of the prerequisite at the moment of the state change, ideally inside the same transaction that creates the subscription, plus idempotency and ordering checks so that a request arriving out of sequence is rejected rather than processed.
How to test for it
- Map the gated feature. Identify actions that require a prerequisite: enabling a paid plan, starting a trial, creating a resource that costs money, unlocking a feature after verification. Note the endpoint each action calls, using the browser's developer tools.
- Establish a clean baseline. With an account that lacks the prerequisite, confirm the UI blocks the action and record the exact request the UI would send if it were allowed.
- Try the race. Reload the page and trigger the action as early as possible, before the prerequisite state has loaded. Repeat with throttled network conditions and with the prerequisite request blocked or delayed in a proxy, so the window is wide and reproducible.
- Try the direct request. Replay the recorded request from step 2 with a valid session, without ever completing the prerequisite. Vary the body: omit the payment or verification fields, send them empty, or send stale values from another account you control.
- Check the result server-side, not just in the UI. Confirm whether the subscription or resource actually exists by querying the account state or the relevant API, and check whether billing or usage records were created.
A positive result is a state change that persists: the feature is active, the resource exists, and the prerequisite is still absent. A response that merely looks successful but leaves the account unchanged is not a finding. Common false positives are cached UI state that shows the feature as enabled while the backend refused it, requests that were actually rejected but rendered optimistically, and trials that legitimately do not require a payment method. Always verify through a second, independent read of the account state.
How it is fixed
The standard fix is to enforce the prerequisite on the server at the point of the state change: before creating the subscription, look up the account's payment method or verification status and reject the request if it is missing. The check should be part of the same transaction as the creation, so it cannot be raced. Endpoints should also validate that the request is arriving in a valid sequence, and the client should treat the server response as the source of truth rather than assuming success. Where a prerequisite is expensive to check, cache the result server-side, not in the browser.
Hunting notes
This class of bug tends to hide in flows with a visible prerequisite step: checkout and plan upgrades, trial activation, identity or KYC gates, invitation limits, and features unlocked after onboarding. It is especially common where the UI is a multi-step wizard, because each step is a separate request and the final one is often the least guarded.
Useful recon signals are endpoints whose names suggest creation or activation of a paid resource, parameters that carry plan or payment identifiers, and front-end code that conditionally enables a button based on a fetched flag. Watching which requests fire during a normal, successful flow tells you what the server expects; replaying the final request without the earlier steps tells you whether it checks.
To get a report accepted, show the prerequisite is genuinely absent after the action, demonstrate the resulting state change with a second read, and keep the reproduction minimal: one account, one request or one timing window. Explain the abuse the prerequisite was meant to prevent, and avoid overstating impact beyond what you can demonstrate.
Glossary
- Object storage: a way of storing files as individual objects in a flat space, often used for backups, media or large datasets.
- Subscription: an ongoing paid plan that enables a product or feature.
- Payment method: a credit card or other billing instrument stored on the account.
- Access control: rules that decide who is allowed to do what.
- Client: the part of a system that runs in your browser or on your device.
- Server: the remote computer that stores data and makes decisions.
- Endpoint: a specific URL that a program can send a request to.
- API request: a message sent by a program to a server asking it to do something or return data.
- Race condition: a situation where the order or timing of actions changes the outcome.
- Session: a logged-in state that lets the server recognise you across requests.
- Front end: the part of a website you see and interact with.
- Backend: the server-side logic and data storage behind the website.
- Transaction: a group of operations that must all succeed or all fail together.
- Idempotency: the property that repeating the same request has the same effect as doing it once.
- Proxy: a tool that sits between your browser and the server and can inspect or modify traffic.
- False positive: a result that looks like a bug but is not.
- KYC: know your customer, an identity verification process.
- Recon: the information-gathering phase before testing.
- State change: a lasting modification to data, such as creating a subscription.