Skip to content
Access control Write-up Beginner

Stripe Auth Bypass: Lockout Screen Case Study

Stripe's dashboard lockout screen was only enforced in the browser, so a request to invite a new team member still succeeded while the session was locked. Someone with local access to an unattended, signed-in browser could add themselves as an administrator and keep access to the payments account.

medium.com

Published on medium.com

Bug Bounty

Muhammad Asim Shahzad, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Stripe's dashboard is the web interface where a merchant manages a payments account: team members, roles, payouts, webhooks and API keys all live behind it. Like many sensitive consoles, it applies an inactivity lock. After a period of idle time the session cookie is still present, but the user is expected to re-enter their password before doing anything further. The purpose is to protect an unattended, logged-in laptop: someone who walks up to a machine that was left signed in should not be able to act as the account owner.

In 2017, Jon Bottarini reported that this lockout could be bypassed for one specific action. A dashboard that had timed out and was demanding a password still accepted a request to invite an administrator. Stripe confirmed that a back-end check had been accidentally removed for that action, fixed it shortly after the report, and paid $500. The report was published with Stripe's permission on 3 April 2017.

AI-generated illustration From the original on medium.com

The illustration above accompanies the case study's framing: a re-authentication wall drawn in the browser is not a security control.

Setup

The precondition here is physical or local access to a browser in which the victim had been signed in, so this is not a remote attack. The researcher worked from the browser's own developer tools against the locked dashboard. No special accounts, roles, tool versions or proxy setup are described in the report.

Finding it

The lockout was presented as an overlay with disabled controls. The researcher noticed that "disabled" was largely a presentation choice: by changing the page in the browser's developer tools, he could reach parts of the dashboard that sat behind the overlay. That is the classic inspect-element observation. The interesting question is not whether the overlay can be removed, but what the server does when a request arrives from a session that is supposed to be locked.

Most actions were still refused by the server. Inviting a new team member was not. That single inconsistency is what turned a cosmetic observation into a reportable authentication bypass.

Exploitation

Step 1: reach the locked dashboard

A signed-in session is left idle until the dashboard locks. The session cookie still exists, but the interface demands a password before anything else.

Step 2: remove the presentation layer

Using the browser's developer tools, the researcher edited the page so that the overlay and its disabled controls no longer stood in the way, exposing the parts of the dashboard behind it. This is a client-side change only; nothing about the session state on the server changes.

Step 3: try actions behind the wall

With the interface out of the way, requests could be issued for actions the lockout was meant to block. Most of them were still refused by the server, which is the behaviour you want: the UI was decoration, but the back end was enforcing the rule.

Step 4: invite an administrator

The exception was the team invitation. A request to invite a new team member, specifically an administrator, was accepted even though the session was locked. The researcher noted that webhook changes were blocked, which shows the control existed but was applied unevenly.

The report does not include the raw request or response for the invitation, so the exact endpoint, parameters and headers are not reproduced here.

Root cause

Stripe later explained that its back end normally enforces the re-authentication check and that this one action had lost it by accident. In other words, the invitation path was missing the check that the back end normally enforces. The UI looked locked, and for nearly everything the server agreed. One gap was enough.

Mapped analytically, this is CWE-602 (Client-Side Enforcement of Server-Side Security) together with CWE-306 (Missing Authentication for Critical Function). No CVE was reported, and no severity or CVSS score is given; the bounty was $500, as reported by the source.

Impact

The precondition is physical or local access to a browser where the victim had been signed in, so this is not a remote attack. Within that scope it is serious: inviting yourself as an administrator turns a few unattended minutes into durable access to a payments account that survives the victim logging out. The lockout exists precisely to stop that scenario, and for this one action it did not.

Fix

Stripe fixed the issue shortly after the report. The report does not describe the code change itself.

The case study's own defensive recommendations go further than the single fix:

  1. Treat the UI as a hint, never the gate. Hidden, greyed-out and disabled controls are convenience. The server must reject the request on its own.
  2. Enforce re-authentication as default-deny middleware. Mark sensitive routes in one place and fail closed, so a new or refactored endpoint cannot silently skip the check.
  3. Test the negative path. Add automated tests proving every privileged action fails while a session is locked or stale.
  4. Watch privilege changes. Notify existing owners when an admin is invited and require the invitee to verify.

The illustrative code from the case study, showing a central sensitive-action set, a lock check and a negative test:

Python
SENSITIVE = {"team.invite", "team.role_change", "payout.update",             "webhook.update", "api_key.create"}def handle(request, action):    s = sessions.get(request.session_id)    if s is None:        raise Unauthorized()    if s.idle_seconds() > IDLE_LIMIT:        s.mark_locked()    if action in SENSITIVE or s.is_locked():        if not s.recent_reauth(within_seconds=300):            raise ReauthRequired()          return dispatch(action, request, s)def test_locked_session_blocks_sensitive_actions():    for action in SENSITIVE:        assert call(action, [redacted] == 401

Variants to test

  • Every privileged action on a locked session. Enumerate team invitations, role changes, payout settings, webhook configuration and API key creation, then replay each one from a session that should be locked. A positive result is any action that succeeds where the UI demands re-authentication.
  • Newly added endpoints. Look for features shipped after the lockout was designed. A positive result is an endpoint that accepts a locked session because it was written without the central check.
  • Refactored routes. Compare old and new paths for the same function. A positive result is one path enforcing re-authentication and its replacement not doing so.
  • Privilege escalation via invitation. Invite an account you control as an administrator from a locked session. A positive result is an accepted invitation that grants durable access after the victim logs out.
  • Adjacent sensitive flows. Password change, email change and two-factor reset are the same class of action. A positive result is any of them completing without a fresh password entry on a locked session.

Key takeaways

  • If the server does not enforce it, it is not a control; it is decoration.
  • Centralised, deny-by-default checks survive refactors better than per-endpoint code.
  • Low bounties can still teach high-value lessons about uneven enforcement.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

Stripe is a company that lets businesses accept payments online. Its customers, the merchants, log in to a website called the dashboard to manage their account: who works on the team, what roles they have, where money is paid out, which systems get notified when a payment happens, and the secret keys that let software talk to Stripe.

Because that dashboard can move real money, Stripe added a safety feature. If you leave the dashboard open and walk away, after a while it locks itself and asks for your password again before you can do anything. The idea is simple: if you leave your laptop open in a cafe and step away, a stranger who sits down at it should not be able to act as you.

In 2017, a researcher called Jon Bottarini found that this lock was not complete. The screen looked locked, but one specific action, inviting a new administrator to the team, still went through without the password. Stripe confirmed that a check on its own servers had accidentally been removed for that one action, fixed it soon after, and paid a $500 bounty. The report was published with Stripe's permission on 3 April 2017.

AI-generated illustration From the original on medium.com

The picture above sums up the lesson: a lock drawn on the screen in your browser is not a real lock. A real lock lives on the server, the computer that actually holds the account.

The words you need first

Before the details, a few everyday ideas. Each one comes back later.

  • Server and browser. The browser is the program on your computer showing the page. The server is the computer far away that stores the account and decides what is allowed. The browser can ask; only the server can agree.
  • Request. Every click that does something sends a small message from the browser to the server, like a form handed over at a counter. The server answers with a response.
  • Session cookie. When you log in, the server gives your browser a small piece of text, the session cookie, which the browser sends back with every request. It is like a wristband at an event: show it and staff know you already checked in. It proves you logged in at some point, not that you are the person holding the laptop right now.
  • Re-authentication. Asking for the password again, mid-session, before a sensitive action. The wristband is not enough for the vault; you have to show ID once more.
  • API. The set of addresses on the server that the page (or any program) can send requests to. Think of it as the service counter with numbered windows: each window does one job, such as "invite a team member".
  • Client-side and server-side. Client-side means work done in your browser, on your machine. Server-side means work done on Stripe's computers. Only server-side checks are real, because you control your own browser and can change what it does.
  • Developer tools. A panel built into every browser, opened with a key or a menu, that lets you look at and edit the page you are viewing. It is a legitimate tool used by developers, and also by attackers.
  • Authentication bypass. A flaw where something that should require proof of identity does not ask for it. Here, an action that should have demanded the password did not.
  • Privilege escalation. Gaining more power on an account than you were given. Making yourself an administrator is the classic example.
  • Webhook. A setting that tells Stripe to send a notification to another system when something happens, for example when a payment succeeds. Changing it can redirect information, which is why it is sensitive.
  • Bounty. A reward a company pays to someone who reports a security flaw responsibly instead of abusing it.

The setup

The important condition is that the attacker needs to be at a browser where the victim was already logged in. This is not something done over the internet from far away. It is the unattended laptop scenario: the victim signed in, walked away, and the dashboard locked itself, but the session cookie was still in the browser.

The researcher worked from the browser's own developer tools against that locked dashboard. The report does not describe any special accounts, roles, software versions or proxy tools.

Finding it

When the dashboard locks, it does not send you to a different page. It puts a grey layer, an overlay, over the page and disables the buttons underneath. The page is still there; it is just covered and switched off.

The researcher noticed that "disabled" was mostly a visual choice. Using the developer tools, he could edit the page in his own browser and get to the parts of the dashboard sitting behind the overlay. This is the well-known inspect-element trick: right-click, inspect, change the page.

The interesting question is not whether the overlay can be removed. Anyone can remove it, because it lives in their own browser. The real question is what the server does when a request arrives from a session that is supposed to be locked. If the server refuses, the overlay was decoration and nothing more. If the server agrees, there is a hole.

Most actions were still refused by the server. Inviting a new team member was not. That one inconsistency turned a cosmetic observation into a reportable authentication bypass.

Exploitation, step by step

Step 1: reach the locked dashboard

A signed-in session is left idle until the dashboard locks. The session cookie still exists, but the interface demands a password before anything else. This is the normal, intended behaviour, and it is what protects the unattended laptop.

Step 2: remove the presentation layer

Using the browser's developer tools, the researcher edited the page so that the overlay and its disabled controls no longer stood in the way, exposing the parts of the dashboard behind it. This change happens only in his own browser. Nothing about the session state on the server changes: as far as Stripe's computers are concerned, the session is still locked.

Why do this? To find out whether the lock is enforced by the server or only drawn by the page. Removing the drawing is the cheapest way to ask the question.

Step 3: try actions behind the wall

With the interface out of the way, requests could be sent for actions the lockout was meant to block. Most of them were still refused by the server. That is the behaviour you want: the page was decoration, but the back end was enforcing the rule. Each refusal is evidence that the control exists and works, which makes any success stand out.

Step 4: invite an administrator

The exception was the team invitation. A request to invite a new team member, specifically an administrator, was accepted even though the session was locked. The researcher also noted that webhook changes were blocked, which shows the control existed but was applied unevenly: some doors were locked, one was not.

The report does not include the raw request or response for the invitation, so the exact address, parameters and headers are not reproduced here.

Why it happened

Stripe later explained that its back end normally enforces the re-authentication check and that this one action had lost it by accident. In plain terms, the invitation action was missing the password check that the back end normally enforces.

The page looked locked, and for nearly everything the server agreed. One gap was enough.

Analysts map this kind of flaw to two standard categories. CWE-602 means "client-side enforcement of server-side security": trusting the browser to enforce a rule that only the server can truly enforce. CWE-306 means "missing authentication for a critical function": a sensitive action that does not ask for the proof it should. No CVE was reported, and no severity or CVSS score is given; the bounty was $500, as reported by the source.

What it meant in practice

The precondition is physical or local access to a browser where the victim had been signed in, so this is not a remote attack. Within that scope it is serious. Inviting yourself as an administrator turns a few unattended minutes into lasting access to a payments account, access that survives the victim logging out. The lockout exists precisely to stop that scenario, and for this one action it did not.

The fix

Stripe fixed the issue shortly after the report. The report does not describe the code change itself.

The case study's own defensive recommendations go further than the single fix:

  1. Treat the page as a hint, never the gate. Hidden, greyed-out and disabled controls are convenience. The server must reject the request on its own.
  2. Enforce re-authentication in one central place, and refuse by default. Mark sensitive actions in a single list and fail closed, so a new or rewritten action cannot silently skip the check.
  3. Test the negative path. Add automated tests proving every privileged action fails while a session is locked or stale.
  4. Watch privilege changes. Notify existing owners when an admin is invited and require the invitee to verify.

The illustrative code from the case study shows a central list of sensitive actions, a lock check and a negative test:

Python
SENSITIVE = {"team.invite", "team.role_change", "payout.update",             "webhook.update", "api_key.create"}def handle(request, action):    s = sessions.get(request.session_id)    if s is None:        raise Unauthorized()    if s.idle_seconds() > IDLE_LIMIT:        s.mark_locked()    if action in SENSITIVE or s.is_locked():        if not s.recent_reauth(within_seconds=300):            raise ReauthRequired()          return dispatch(action, request, s)def test_locked_session_blocks_sensitive_actions():    for action in SENSITIVE:        assert call(action, [redacted] == 401

Line by line, in plain words:

  • SENSITIVE = {...} is one list of the actions that need extra care: inviting a team member, changing a role, changing payout settings, changing webhooks, creating an API key. Keeping the list in one place is the whole point: you can read it and check it.
  • def handle(request, action): is the single function every action passes through. Because it is single, no action can quietly avoid it.
  • s = sessions.get(request.session_id) looks up the session from the cookie the browser sent. The cookie is the wristband; this line reads it.
  • if s is None: raise Unauthorized() says: no valid session, no entry. The request is refused.
  • if s.idle_seconds() > IDLE_LIMIT: s.mark_locked() says: if the user has been idle too long, mark the session as locked. This is the timeout.
  • if action in SENSITIVE or s.is_locked(): says: if the action is on the sensitive list, or the session is locked, then extra proof is needed.
  • if not s.recent_reauth(within_seconds=300): raise ReauthRequired() says: unless the password was entered recently, refuse and ask for it. The 300 is a number of seconds chosen for the example.
  • return dispatch(action, request, s) is the only path that actually performs the action, and it is reached only after the checks above.
  • def test_locked_session_blocks_sensitive_actions(): is an automated test. It loops over every sensitive action and asserts that calling it with a locked session returns status 401, which means "not authorised". If someone later adds an action and forgets the check, this test fails.

Other places to look for the same mistake

  • Every privileged action on a locked session. List team invitations, role changes, payout settings, webhook configuration and API key creation, then replay each one from a session that should be locked. A positive result is any action that succeeds where the page demands re-authentication.
  • Newly added features. Look for features shipped after the lockout was designed. A positive result is an action that accepts a locked session because it was written without the central check.
  • Rewritten routes. Compare old and new paths for the same function. A positive result is one path enforcing re-authentication and its replacement not doing so.
  • Privilege escalation via invitation. Invite an account you control as an administrator from a locked session. A positive result is an accepted invitation that grants lasting access after the victim logs out.
  • Neighbouring sensitive flows. Password change, email change and two-factor reset are the same class of action. A positive result is any of them completing without a fresh password entry on a locked session.

Key takeaways

  • If the server does not enforce it, it is not a control; it is decoration.
  • Centralised, refuse-by-default checks survive rewrites better than checks written into each action separately.
  • Low bounties can still teach high-value lessons about uneven enforcement.

Glossary

  • API: the set of addresses on a server that a page or program can send requests to, each doing one job.
  • Authentication: proving who you are, usually with a password.
  • Bounty: a reward a company pays for a responsibly reported security flaw.
  • Browser: the program on your computer that shows web pages.
  • Client-side: work done in your own browser, on your own machine, which you can change.
  • Cookie (session cookie): a small piece of text the server gives your browser at login and the browser sends back with each request, proving you logged in earlier.
  • CVE: a public identifier given to a known security flaw. None was reported here.
  • CVSS: a standard score for how severe a flaw is. None is given here.
  • CWE-306: a category meaning a critical function is missing the authentication it should require.
  • CWE-602: a category meaning a rule is enforced in the browser instead of on the server.
  • Developer tools: a panel built into browsers for inspecting and editing the current page.
  • Overlay: a layer drawn on top of a page, here the grey lockout screen.
  • Privilege escalation: gaining more power on an account than you were given, such as making yourself an administrator.
  • Request / response: the message the browser sends to the server, and the answer it gets back.
  • Server: the remote computer that stores the account and decides what is allowed.
  • Server-side: work done on the company's computers, which the user cannot change.
  • Session: the period during which the server remembers you as logged in, identified by the session cookie.
  • Webhook: a setting that makes Stripe notify another system when something happens, such as a successful payment.
  • 401: the response status meaning "not authorised", used in the example test.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.