500$: MFA bypass By Race Condition
A race condition in the API token generation endpoint allowed an attacker to obtain API tokens without supplying a valid MFA code. This could let an unauthorised user generate tokens and potentially control admin accounts.
Published on medium.com
{{media:0}}
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.
Context
The target was a private bug bounty program, referred to in the write-up by the virtual name Exendly. The feature involved is the integration platform, where users generate API keys (personal access tokens) that are used to access and control Exendly accounts. Because these keys are powerful, the platform requires Multi-Factor Authentication before a token can be generated, so that only genuine users can create them. There is also a business limit of 10 API keys per account.
The researcher's original goal was not MFA at all: he was trying to break other logic in the software, specifically to get past the 10-key limit. While doing that he found a way to bypass the MFA step entirely by exploiting a race condition during token generation.
Setup
The testing was carried out on a private program, against the integration page at https://exendly.com/integrations/api_webhooks (the write-up links to the Calendly equivalent URL). The write-up suggests a tool such as Turbo Intruder to fire the token-generation request concurrently.
Finding it
The researcher was probing the API key limit: the platform allows a maximum of 10 keys, and he tried to create more than 10. In the course of that he noticed that the MFA challenge that guards token generation could be skipped. The observation was that by manipulating the sequence of events around the token request, tokens could be produced without a valid MFA code. The write-up describes this as a flaw that lets an attacker manipulate the order in which the MFA check and the token creation happen.
Exploitation
Step 1: Open the integration page
Visit the API webhooks integration page:
https://exendly.com/integrations/api_webhooks
This is the page from which personal access tokens are generated.
Step 2: Trigger the MFA challenge
Click the "Generate Token" button. This starts the MFA challenge that is meant to gate token creation.
Step 3: Intercept the token request
Capture the request that the page sends to create the token:
POST /api/integrations/personal_access_tokens HTTP/2Host: Exendly.comCookie: Dnt: 1Sec-Fetch-Dest: emptySec-Fetch-Mode: corsSec-Fetch-Site: same-originTe: trailers{"label":"aa"}
The request is a POST to /api/integrations/personal_access_tokens over HTTP/2, with a body containing {"label":"aa"}. The captured request as reproduced in the write-up shows a Cookie header and several Sec-Fetch-* and Te headers.
Step 4: Race the request
Send the intercepted request concurrently with a tool such as Turbo Intruder, so that many token-generation requests are in flight at the same time.
Step 5: Read the responses
Look through the responses for 200 OK results. Those are the instances where an API token was generated without a valid MFA code. The success status is the signal that the MFA check was skipped for that request.
Root cause
The write-up attributes the bug to a race condition in the token-generation flow: a flaw lets attackers manipulate the sequence of events so tokens are generated without a valid MFA code. The report does not show the server-side code, so the exact ordering mistake is not documented;
Impact
The vulnerability compromises the integrity of MFA. An attacker able to race the token request can generate API tokens without a valid MFA code, and those tokens are the credentials used to access and control Exendly accounts. The write-up states that this could potentially grant unauthorised users control over admin accounts. The researcher frames the finding as an MFA bypass that he obtained while only trying to exceed the 10-key limit.
Fix
The write-up does not describe any fix or change made by the program. It only records that the Exendly team paid 500 USD for the bug.
Variants to test
- Race any endpoint that sits behind a second factor: send the action request concurrently and look for
200 OKresponses that arrive without a valid code having been submitted. - Race the token or key creation endpoint itself, as here, and check whether more objects are created than the account limit allows; a positive result is a count above the stated maximum.
- Race the MFA verification endpoint against the protected action, so that verification and action overlap; a positive result is the action succeeding while verification is still pending or has failed.
- Repeat the race with different concurrency levels and with the same label, watching for inconsistent responses; a positive result is a mix of success and failure for identical requests.
- Test other flows that combine a check with a state change, such as password change, email change or permission grants, using the same concurrent-request technique; a positive result is the state change completing without the check having passed.
What happened, in plain words
A security researcher was testing a website that lets people manage their accounts and integrations. His original goal had nothing to do with login security: he wanted to see whether he could create more than the 10 API keys the site allowed. While poking at that limit, he stumbled on something bigger. The site asks for a second proof of identity (MFA) before it will create an API key. He found that by sending many requests at almost exactly the same moment, the site would hand out API keys without ever checking that second proof. The company paid him 500 USD for the finding.
This article walks through that story from zero. You only need to know how to use a browser. Every technical word is explained the first time it appears, and there is a glossary at the end.

The image is the author's profile picture on the publishing platform, next to the article title.
The pieces you need to understand first
Before the steps make sense, here are the ideas involved, in everyday terms.
- API: think of a restaurant. The dining room (the website you see) is the menu; the kitchen (the server) does the real work. The API is the waiter: a fixed way for the page to ask the kitchen for things and get answers back. Websites use APIs constantly, often without you noticing, for example when a page saves a setting without reloading.
- API key (also called a personal access token): a long secret string that acts like a password for a program rather than a person. If you give a tool your API key, that tool can act on your account without knowing your username and password. Because a key is so powerful, losing one is like losing your house keys.
- MFA (Multi-Factor Authentication): a second proof that you are you, on top of your password. The common example is a six-digit code from an app or a text message. The idea is that a stolen password alone is not enough; the thief also needs your phone. In this story, MFA guards the creation of API keys.
- Cookie: a small piece of data your browser stores for a website and sends back with every request, so the site can recognise you between page loads. It is how a site remembers that you are logged in. Think of it as the wristband you get at an event: you show it once at the door, and afterwards staff just glance at your wrist.
- HTTP request: the message your browser sends to a server to ask for something or to make something happen. It has a method (a verb such as
GETto read orPOSTto create), a path (which thing you want), and headers (extra labels and information). - Race condition: a bug that appears when two or more actions happen at the same time and the program assumes they happen one after another. A everyday comparison: two people reach a single door at the same moment, both see it unlocked, both walk through, and the door was only supposed to admit one. If a program checks a condition and then acts on it, and something else can slip in between the check and the act, you have a race condition.
- MFA bypass: getting past the second proof without actually providing it. The account still thinks it is protected, but an attacker is inside anyway.
- Turbo Intruder: a tool used by security testers to send many copies of the same request at almost the same instant, which is exactly what you need to trigger a race condition.
The setup
The testing happened on a private bug bounty program. A bug bounty program is a scheme where a company invites independent researchers to look for security problems and pays them for genuine findings, instead of punishing them. The company is referred to in the write-up by the made-up name Exendly, to keep the real client private.
The feature involved is the integration platform: the part of the site where you connect other software to your account. To do that, you generate API keys, and those keys can access and control Exendly accounts. Because the keys are so powerful, the platform requires MFA before a key can be generated, so that only the genuine account holder can create one. There is also a business rule: an account may hold at most 10 API keys.
The researcher's original aim was not MFA at all. He was trying to break other logic in the software, specifically to get past that 10-key limit. While doing that, he found a way to skip the MFA step entirely by exploiting a race condition during key generation.
Finding it
He was probing the API key limit: the platform allows a maximum of 10 keys, and he tried to create more than 10. In the course of that he noticed that the MFA challenge guarding key generation could be skipped. The observation was that by manipulating the sequence of events around the token request, tokens could be produced without a valid MFA code. The write-up describes this as a flaw that lets an attacker manipulate the order in which the MFA check and the token creation happen.
Exploitation, step by step
Step 1: Open the integration page
Visit the API webhooks integration page:
https://exendly.com/integrations/api_webhooks
This is the page from which personal access tokens are generated. Opening it is just the starting point: it puts you in the right place in the application, logged in as yourself, so that the next actions are the normal ones a user would take.
Step 2: Trigger the MFA challenge
Click the "Generate Token" button. This starts the MFA challenge that is meant to gate token creation. The reason for doing this is to make the application produce the exact request it would normally send when creating a key, so that the researcher can capture it and study it.
Step 3: Intercept the token request
Capture the request that the page sends to create the token:
POST /api/integrations/personal_access_tokens HTTP/2Host: Exendly.comCookie: Dnt: 1Sec-Fetch-Dest: emptySec-Fetch-Mode: corsSec-Fetch-Site: same-originTe: trailers{"label":"aa"}
Line by line, in plain words:
POST /api/integrations/personal_access_tokens HTTP/2is the request line.POSTis the verb that means "create something"./api/integrations/personal_access_tokensis the path: the address of the part of the server that creates personal access tokens.HTTP/2is the version of the language the browser and server use to talk.Host: Exendly.comtells the server which site the request is for. One server can host many sites, so this label says which one is meant.Cookie:is where the browser would normally attach your session cookie, the wristband that proves you are logged in.Sec-Fetch-Dest,Sec-Fetch-Mode,Sec-Fetch-SiteandTeare extra headers that came along with the captured request.{"label":"aa"}is the body of the request, containing alabelfield set toaa.
Capturing the request matters because the browser normally hides this exchange. Once you have the exact request in your hands, you can replay it as many times as you like, and at whatever timing you like, which is the whole basis of the attack.
Step 4: Race the request
Send the intercepted request concurrently with a tool such as Turbo Intruder, so that many token-generation requests are in flight at the same time. The point is to have several requests being processed by the server simultaneously, which is what triggers the race condition.
Step 5: Read the responses
Look through the responses for 200 OK results. 200 OK is the standard HTTP status code meaning "the request succeeded". Those are the instances where an API token was generated without a valid MFA code. The success status is the signal that the MFA check was skipped for that request.
Why it worked
The write-up attributes the bug to a race condition in the token-generation flow: a flaw lets attackers manipulate the sequence of events so tokens are generated without a valid MFA code. "Atomic" means all-or-nothing, like a light switch that is either fully on or fully off, never halfway. Here, the check and the action are two separate steps, so concurrent requests can interleave and reach token creation without a valid MFA code. The report does not show the server-side code, so the exact ordering mistake is not documented; "Serialise" here means forcing requests to queue up and be handled one at a time.
What the impact was
The vulnerability compromises the integrity of MFA. An attacker able to race the token request can generate API tokens without a valid MFA code, and those tokens are the credentials used to access and control Exendly accounts. The write-up states that this could potentially grant unauthorised users control over admin accounts. The researcher frames the finding as an MFA bypass that he obtained while only trying to exceed the 10-key limit.
The bounty
The Exendly team paid 500 USD for the bug. The write-up does not describe any fix or change made by the program.
What the researcher took away from it
His takeaway is that you should always try things, because you may not get what you were looking for, but you may get something else that is more important. He was only trying to bypass the 10-key limit, and he found an MFA bypass instead.
Other places to look for the same pattern
- Race any endpoint that sits behind a second factor: send the action request concurrently and look for
200 OKresponses that arrive without a valid code having been submitted. - Race the token or key creation endpoint itself, as here, and check whether more objects are created than the account limit allows; a positive result is a count above the stated maximum.
- Race the MFA verification endpoint against the protected action, so that verification and action overlap; a positive result is the action succeeding while verification is still pending or has failed.
- Repeat the race with different concurrency levels and with the same label, watching for inconsistent responses; a positive result is a mix of success and failure for identical requests.
- Test other flows that combine a check with a state change, such as password change, email change or permission grants, using the same concurrent-request technique; a positive result is the state change completing without the check having passed.
Glossary
- API: a fixed way for one piece of software to ask another for data or actions, like a waiter carrying orders between the dining room and the kitchen.
- API key (personal access token): a secret string that lets a program act on your account, like a password for software.
- Atomic operation: an action that happens all at once or not at all, with no halfway state.
- Bug bounty program: a scheme where a company pays independent researchers for reporting genuine security problems.
- Check-then-act: a pattern where a program first checks a condition and then performs an action, leaving a gap in between that concurrent requests can exploit.
- Concurrency: several things happening at the same time rather than one after another.
- Cookie: a small piece of data a browser stores for a site and sends back with each request, used to remember that you are logged in.
- Header: an extra label or piece of information attached to an HTTP request or response.
- HTTP: the language browsers and servers use to exchange requests and responses.
- HTTP/2: a version of HTTP that can handle many requests efficiently.
- JSON: a simple text format for structured data, such as
{"label":"aa"}. - MFA (Multi-Factor Authentication): a second proof of identity beyond a password, such as a code from a phone.
- POST: the HTTP verb used to create something or send data to the server.
- Race condition: a bug that appears when simultaneous actions interleave in a way the program did not expect.
- Serialise: to force actions to happen one at a time, in order.
- Status code: a number in an HTTP response saying how the request went;
200 OKmeans success. - Turbo Intruder: a tool for sending many copies of a request at almost the same instant.
- 200 OK: the HTTP status code meaning the request succeeded.