How Peloton Confused Authentication with Authorization
Peloton's API exposed user data without authentication, and after a fix that only added a login check, any registered user could still access other users' private data by object ID. An attacker could retrieve personal details and workout statistics of any customer, including those with private profiles.
Bug Bounty
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
Peloton's bikes and app talk to Peloton's servers through an API, the same basic arrangement behind every connected device and mobile app. The data behind that API includes user IDs, workout statistics and personal details, and users can set their profile to private so that information is hidden.
The case was found by Jan Masters at Pen Test Partners in January 2021 and reported responsibly. His own writeup, Tour de Peloton: Exposed user data, is still up with the full technical detail. What makes it worth teaching is that the company's first fix did not fix anything.

Setup
No special tooling is described. The entry point was located by pointing a request at an API endpoint and observing the response. The precondition for the first finding was simply that no credentials of any kind were needed. The precondition for the second finding, after Peloton's first fix, was a free Peloton account, which anyone can self-register for in about thirty seconds.
Finding it
Masters pointed a request straight at api.onepeloton.co.uk/stats/workouts/details and got back a full response: user ID, workout statistics, personal details, with no login, no token, no authentication of any kind attached to the request at all.
That is the most basic check there is on any API endpoint, and it is the one people skip past, assuming surely a company this size would not leave it open: just send the request with nothing attached, and see if it actually stops you.

Exploitation
Step 1: request the stats endpoint with no credentials
The request carried no login, no token and no authentication of any kind. The endpoint responded with user ID, workout statistics and personal details.
A full response came back. One open door was confirmed.
Step 2: check whether the same carelessness extends to other endpoints
Rather than stopping at one open door, Masters went looking at what else the app's own traffic revealed. The methodology is the point: once you have found one unauthenticated endpoint on a target, immediately check whether the same carelessness extends to every other endpoint the same app talks to, because teams rarely make this mistake exactly once.
He found a user search endpoint, api.onepeloton.com/api/user/search/, that handed back profile data for literally any query string thrown at it. Critically, it did this for users who had deliberately set their profile to private. That detail elevates the issue from an API that forgot a login check to a real privacy failure: the app had a setting telling users their information was hidden, and the backend simply never enforced it.

Step 3: the GraphQL endpoint
On top of both of those, he found a third issue: an unauthenticated GraphQL endpoint handing out similar data through a completely different query mechanism. Three separate paths into the same underlying problem.
That is its own lesson: a single root cause, nobody checking who is asking before handing over data, tends to repeat itself across every endpoint built around the same object rather than showing up just once.
Root cause
Masters reported all of it in January 2021 and gave Peloton the standard 90 days most responsible disclosure programs run on. Two weeks in, Peloton quietly shipped a change and said nothing to him about it.
He checked, and the "fix" now required you to be logged in as a Peloton user before the endpoint would respond. Authentication had been added. Authorization had not. Any one of Peloton's three million actual customers could still query the exact same endpoint and pull back the exact same private data belonging to any other customer: age, city, weight, workout history, the private-profile data included, completely unchanged from before. The only thing that actually changed was that the attacker now needed a free account first.
That gap, between "did we check that a request has some valid identity attached" and "did we check that this specific identity is allowed to see this specific person's data," is Broken Object Level Authorization. It sits near the top of the OWASP API Security list for a reason: it is an extremely natural mistake to make, because adding a login wall feels like it solved the problem, and from a quick glance at a dashboard showing "unauthenticated requests: 0," it genuinely looks solved.
The actual question an API has to answer on every single request is not "is someone logged in," it is "is this specific logged-in someone allowed to see this specific object they are asking about." Those are two completely different checks that have to be implemented separately, because fixing the first one tells you nothing about whether the second one exists at all.

Impact
Before the first fix, anyone could pull user IDs, workout statistics and personal details from the stats endpoint with no authentication at all. The search endpoint returned profile data for any query string, including for users who had set their profile to private, so the privacy setting users were told about was not enforced on the backend. The GraphQL endpoint exposed similar data through a different query mechanism.
After the first fix, the same private data remained reachable by any of Peloton's three million customers, against any other customer, with only a free self-registered account required. The exposed fields named in the report are age, city, weight and workout history, private-profile data included.
Fix
Peloton only actually closed the real gap after Pen Test Partners, having been ignored through the entire 90-day window and past it, brought in a TechCrunch journalist to reach out directly, at which point the company had an answer and a real fix within a day. The report does not describe the technical content of that final fix; what it makes clear is that the first change, adding a login requirement, was not a fix at all, because authorization was still missing.
The lesson about the human side is separate from the technical one: responsible disclosure assumes good faith on both ends, and when a company goes quiet, the researcher's actual leverage is patience and documentation, not immediately burning the finding in frustration.
Variants to test
The generalizable test to carry into your own API work is straightforward enough to run on almost anything:
- Find an object-level endpoint that is protected by a login. Do not stop there and call it secure.
- Log in as account A and note an object ID.
- Switch to account B and request that exact same ID.
- If B gets A's data back, authentication was never the problem that needed solving, authorization was, and it still does not exist.
A positive result is account B receiving account A's object data. The same reasoning applies to any endpoint built around the same object: if one endpoint on a target lacks the check, test the others the same app talks to, including alternate query mechanisms such as GraphQL, and include objects whose owners have marked them private, since a privacy setting that the backend never enforces is itself the finding.
Happy hunting, see you in the next scope :)
What happened, in plain words
Peloton makes exercise bikes and a phone app. Both of them talk to Peloton's computers over the internet to fetch your workout numbers, your profile and so on. The channel they use is called an API, which is simply a way for one piece of software to ask another piece of software for data, a bit like a waiter taking your order to the kitchen and bringing back a plate. You never see the kitchen; you just get the food.
The data behind that API includes user IDs (a number that identifies each account), workout statistics, and personal details. Users can also set their profile to private, which is a promise that this information is hidden from other people.
In January 2021 a security researcher called Jan Masters, working at a company called Pen Test Partners, found that several of these API addresses would hand over people's data to anyone who asked, with no login at all. He reported it responsibly, meaning he told the company privately and gave them time to fix it before saying anything publicly. His own write-up, Tour de Peloton: Exposed user data, is still online with the full technical detail.
What makes this case worth learning from is that Peloton got the fix wrong not once but twice. The first attempt added a login requirement but still let any logged-in customer read any other customer's private data. The second attempt, which only came after a journalist got involved, arrived within a day.

The words you need first
Before the steps, a handful of terms, because everything below depends on them.
- API: the set of addresses a company's servers expose so that apps and devices can ask for data or actions. Think of a restaurant menu of dishes you are allowed to order; each dish has a name (the address) and the kitchen decides what comes back.
- Endpoint: one specific address on that menu.
api.onepeloton.co.uk/stats/workouts/detailsis one endpoint; a search address is another. - Request: the message your browser or app sends to an endpoint. It can carry extra information, such as who you are.
- Authentication: proving who you are. Showing your passport at the door.
- Authorization: deciding what that proven identity is allowed to see or do. Having a passport does not mean you may open every room in the building.
- Token: a short string of characters that stands in for your login, like a cloakroom ticket. You show the ticket instead of typing your password again on every request.
- Cookie: a small piece of data your browser stores for a website and sends back automatically on each request, often used to carry that login ticket.
- GraphQL: a different style of API where the client sends a query describing exactly which fields it wants, rather than calling a fixed address per thing. Same kitchen, different ordering form.
- Broken Object Level Authorization: the bug where the server checks that you are logged in but never checks that the specific item (the "object") you asked for belongs to you.
Setup
The report describes no special tooling. The entry point was found by sending a request to an API endpoint and looking at what came back. The only precondition for the first finding was that no credentials of any kind were needed. The precondition for the second finding, after Peloton's first fix, was a free Peloton account, which anyone can create by self-registering in about thirty seconds.
Finding it
Masters pointed a request straight at api.onepeloton.co.uk/stats/workouts/details and got back a full response: user ID, workout statistics, personal details. No login, no token, no authentication of any kind was attached to the request.
That is the most basic check there is on any API endpoint, and it is the one people skip past, assuming surely a company this size would not leave it open: just send the request with nothing attached, and see if it actually stops you.

Exploitation
Step 1: request the stats endpoint with no credentials
The request carried no login, no token and no authentication of any kind. The endpoint responded with user ID, workout statistics and personal details.
Line by line:
GETis the type of request. It means "give me this thing", as opposed to sending data to the server. It is the same kind of request your browser makes when you open a normal web page.api.onepeloton.co.ukis the server being asked. Theapi.at the front is a common convention for the machine that serves data to apps rather than web pages to people./stats/workouts/detailsis the path, the specific address on that server for workout statistics details.- There is nothing else in the request: no header saying who you are, no cookie, no token. That absence is the whole point of the test.
A full response came back. One open door was confirmed. The reason to try this first is that it costs nothing and answers the most fundamental question: does this endpoint care who is asking?
Step 2: check whether the same carelessness extends to other endpoints
Rather than stopping at one open door, Masters went looking at what else the app's own traffic revealed. The methodology is the point: once you have found one unauthenticated endpoint on a target, immediately check whether the same carelessness extends to every other endpoint the same app talks to, because teams rarely make this mistake exactly once. If one door in a building is unlocked, you check the others on the same corridor.
He found a user search endpoint, api.onepeloton.com/api/user/search/, that handed back profile data for literally any query string thrown at it. A query string is the part of a web address after a question mark that carries your search words, the same thing you see in a browser address bar after you search. Critically, it did this for users who had deliberately set their profile to private. That detail elevates the issue from an API that forgot a login check to a real privacy failure: the app had a setting telling users their information was hidden, and the backend simply never enforced it. The setting was a label on the door, not a lock.

Step 3: the GraphQL endpoint
On top of both of those, he found a third issue: an unauthenticated GraphQL endpoint handing out similar data through a completely different query mechanism. Three separate paths into the same underlying problem.
That is its own lesson: a single root cause, nobody checking who is asking before handing over data, tends to repeat itself across every endpoint built around the same object rather than showing up just once. If the kitchen will serve any dish to anyone who walks in, it will do so at every counter, not just the first one you tried.
Root cause
Masters reported all of it in January 2021 and gave Peloton the standard 90 days most responsible disclosure programs run on. Responsible disclosure means telling the company privately and waiting a set period before going public, so they have a fair chance to fix it. Two weeks in, Peloton quietly shipped a change and said nothing to him about it.
He checked, and the "fix" now required you to be logged in as a Peloton user before the endpoint would respond. Authentication had been added. Authorization had not. Any one of Peloton's three million actual customers could still query the exact same endpoint and pull back the exact same private data belonging to any other customer: age, city, weight, workout history, the private-profile data included, completely unchanged from before. The only thing that actually changed was that the attacker now needed a free account first.
That gap, between "did we check that a request has some valid identity attached" and "did we check that this specific identity is allowed to see this specific person's data", is Broken Object Level Authorization. It sits near the top of the OWASP API Security list for a reason: it is an extremely natural mistake to make, because adding a login wall feels like it solved the problem, and from a quick glance at a dashboard showing "unauthenticated requests: 0", it genuinely looks solved. OWASP is a well-known community project that publishes lists of the most common security mistakes, and this one ranks high because it is so easy to make.
The actual question an API has to answer on every single request is not "is someone logged in", it is "is this specific logged-in someone allowed to see this specific object they are asking about". Those are two completely different checks that have to be implemented separately, because fixing the first one tells you nothing about whether the second one exists at all. A hotel that checks you have a room key has not checked that the key opens the room you are walking into.

Impact
Before the first fix, anyone could pull user IDs, workout statistics and personal details from the stats endpoint with no authentication at all. The search endpoint returned profile data for any query string, including for users who had set their profile to private, so the privacy setting users were told about was not enforced on the backend. The GraphQL endpoint exposed similar data through a different query mechanism.
After the first fix, the same private data remained reachable by any of Peloton's three million customers, against any other customer, with only a free self-registered account required. The exposed fields named in the report are age, city, weight and workout history, private-profile data included.
Fix
Peloton only actually closed the real gap after Pen Test Partners, having been ignored through the entire 90-day window and past it, brought in a TechCrunch journalist to reach out directly, at which point the company had an answer and a real fix within a day. The report does not describe the technical content of that final fix. What it makes clear is that the first change, adding a login requirement, was not a fix at all, because authorization was still missing.
The lesson about the human side is separate from the technical one: responsible disclosure assumes good faith on both ends, and when a company goes quiet, the researcher's actual leverage is patience and documentation, not immediately burning the finding in frustration. Burning the finding means publishing it in anger, which can put users at risk and removes your chance of a calm resolution.
Variants to test
The generalizable test to carry into your own API work is straightforward enough to run on almost anything:
- Find an object-level endpoint that is protected by a login. Do not stop there and call it secure. An object-level endpoint is one that returns a specific item, such as one user's profile, identified by an ID.
- Log in as account A and note an object ID. An object ID is the number or string that names the item, for example the user ID in the address.
- Switch to account B and request that exact same ID.
- If B gets A's data back, authentication was never the problem that needed solving, authorization was, and it still does not exist.
A positive result is account B receiving account A's object data. The same reasoning applies to any endpoint built around the same object: if one endpoint on a target lacks the check, test the others the same app talks to, including alternate query mechanisms such as GraphQL, and include objects whose owners have marked them private, since a privacy setting that the backend never enforces is itself the finding.
Happy hunting, see you in the next scope :)
Glossary
- Endpoint: one specific address on that API, such as a stats address or a search address.
- Request: the message a browser or app sends to an endpoint, which may or may not carry proof of who you are.
- Response: the data the server sends back.
- Authentication: proving who you are, for example by logging in.
- Authorization: deciding what a proven identity is allowed to see or do.
- Token: a short string that stands in for your login, like a cloakroom ticket.
- Cookie: a small piece of data your browser stores for a site and sends back automatically, often carrying a login ticket.
- Credentials: the proof of identity, such as a username and password or a token.
- Query string: the part of a web address after a question mark that carries search words or parameters.
- GraphQL: a style of API where the client sends a query describing exactly which fields it wants.
- Object: a single item of data, such as one user's profile, usually identified by an ID.
- Object ID: the number or string that names that item.
- Broken Object Level Authorization: the bug where the server checks you are logged in but never checks that the item you asked for belongs to you.
- OWASP API Security list: a well-known community list of the most common API security mistakes.
- Responsible disclosure: telling a company privately about a flaw and waiting a set period, commonly 90 days, before going public.
- Pen Test Partners: the security company where Jan Masters worked when he found the issue.
- TechCrunch: the news outlet whose journalist reached out to Peloton, after which a real fix arrived within a day.
- Self-registration: creating an account yourself, without anyone approving it, which is how a free Peloton account could be made in about thirty seconds.