Stats Token doesn't expire after deactivating account
A stats authorisation token issued to third-party applications remained valid after the user deactivated their account. A third-party application holding that token could therefore continue to track the user's statistics despite deactivation.
- Triaged in under an hour
- Fixed in 1 hour
- Paid in under an hour
- Disclosed after 44 days
Summary by the program
The hacker found that the stats token, that a user can use to access their own account information, does not expire when an account is deactivated. This was resolved so the view could not be used after deactivation.
Summary by the researcher
Application has a feature Authorize your 3rd party stats that provides users a way to generate auth token to track their statistics. The flaw was even if users deactivate their account auth token was not getting expired which allow third applications to track users statistics.
What the report shows
The target is Chaturbate, on the chaturbate.com asset, and the feature in question is one the researcher calls Authorize your 3rd party stats. It lets a user generate an auth token so that third party applications can read that user's statistics.
The researcher's finding was that this token survives account deactivation. When a user deactivates their account, the auth token is not expired, so a third party application that already holds the token can keep tracking that user's statistics.
The program's summary describes the same issue from the access control side: the stats token, which a user can use to access their own account information, does not expire when the account is deactivated. The fix was to make the view unusable after deactivation.
The report was rated low severity with a CVSS score of 2.7, classified as Improper Access Control - Generic, and paid a bounty of 250.00 USD. It was disclosed on 2018-09-27.
The report contains no HTTP requests, parameters, headers or response bodies, so there is nothing to reproduce verbatim here.
Root cause
The report does not describe the implementation, but the behaviour is consistent with deactivation not invalidating issued credentials. The stats token is treated as a standalone bearer credential: once generated, it is validated on its own, without checking whether the account it belongs to is still active. Deactivation leaves the token, and the statistics view it grants access to, still working.
This is a lifecycle problem rather than a parsing or authorisation-logic flaw. The token was valid when issued and remains valid after deactivation.
Impact
Within the report's own framing, the impact is continued access to a deactivated user's statistics by third party applications that hold the token. The researcher describes the consequence as those applications being able to keep tracking the user's statistics after deactivation.
The program's summary frames it as the stats view remaining usable after deactivation. The report does not describe any access to data beyond statistics, and the low severity and 2.7 score reflect that narrow scope.
How this kind of bug works
Many applications issue long-lived bearer credentials for machine-to-machine access: API keys, personal access tokens, OAuth refresh tokens, signed statistics or feed URLs. These credentials are often stored hashed and checked on each request, and the check answers one question: is this token real and unexpired? The account's current state is a separate question, and it is easy to forget.
Account lifecycle events, deactivation, suspension, deletion, password reset, email change, are the moments when every credential belonging to the account should stop working. If the code that performs deactivation only flips a flag on the user row, tokens issued earlier keep passing validation. The same gap appears when tokens are cached, when they are validated by a separate service that does not read the account state, or when the token carries its own expiry far in the future and nothing else.
The defences are straightforward in principle: bind token validation to account state, keep a per-account token registry so deactivation can revoke everything at once, and treat deactivation as a security event equivalent to logout everywhere.
How to test for it
- Identify every credential the application issues: API keys, personal access tokens, OAuth tokens, signed URLs, embed or stats tokens, webhook secrets. Look in account settings, developer pages and any "authorise third party" feature.
- Create a test account and generate each credential. Record what each one can access, using it from a separate client with no session cookie.
- Trigger each lifecycle event in turn: deactivate the account, request deletion, change the password, change the email address, enable or disable two-factor authentication, and log out everywhere.
- After each event, replay the credential against its endpoint. A positive result is a successful response with real account data after the account is deactivated or the credential should have been revoked.
- Also try the reverse: reactivate the account and check whether old tokens come back to life, which suggests the flag is checked nowhere.
Common false positives: the endpoint returning a generic page or cached public data rather than the user's own records; the token being rejected but the client silently falling back to a session cookie; and deactivation flows that are reversible by design, where the product intends the account to return exactly as it was. Confirm the response body actually contains the user's data, and confirm no cookie is present in the replay request.
How it is fixed
- Validate account state on every token-authenticated request, rejecting tokens whose account is deactivated, suspended or deleted.
- Revoke all tokens as part of the deactivation transaction, either by deleting them or by bumping a per-account token version that is checked at validation time.
- Apply the same revocation to password reset, email change and "log out of all devices".
- Prefer short-lived tokens with refresh, so a missed revocation path has a bounded window.
- Add regression tests that deactivate an account and assert every issued credential is refused.
Hunting notes
This bug class hides in features that are easy to overlook because they are not part of the main login flow: statistics and analytics sharing, embed tokens, RSS and feed URLs, calendar subscriptions, API keys for integrations, and OAuth applications that a user has authorised. Any settings page with a "generate token" button is worth a look.
Recon signals include endpoints that accept a token as a query parameter or header and return per-user data, developer or API documentation pages, and account settings screens that mention third party access. Reading the deactivation and deletion flows closely often shows they only touch the user record.
To make the report land, show the full sequence: the token working before deactivation, the deactivation succeeding, and the same token still returning the user's data afterwards, with the response body included. State clearly what data is exposed and what is not, since scope drives severity. A token that only reaches statistics was scored low here.
Difficulty: beginner. The concept is simple token lifecycle testing, and the work is mostly methodical enumeration of issued credentials and lifecycle events rather than exploitation of a complex flaw.
What happened, in plain words
On chaturbate.com it offers a feature the researcher calls Authorize your 3rd party stats. In everyday terms, this is like giving a friend a spare key to your flat so they can water your plants: you generate a special code, called an auth token, and hand it to another application, which then uses that code to read your statistics. The application never needs your password; the token is enough.
A token is a long string of characters that acts as proof of permission. You can think of it as a ticket at a cloakroom: whoever holds the ticket gets the coat, and the person at the desk does not ask who you are. The site issues the ticket, and the third party application presents it on every request.
A request is simply your browser, or another program, asking a server for something: a page, a number, a list of records. The server answers with a response, which contains the data.
The researcher found that this ticket keeps working after the account is deactivated. Deactivation is the step where a user switches their account off, so it should no longer be usable. The program's own summary says the same thing from the access side: the stats token, which a user can use to access their own account information, does not expire when the account is deactivated. The fix was to make the view unusable after deactivation.
So the sequence is simple. A user generates a token and gives it to a third party application. The user deactivates their account. The token is not expired, so the third party application can keep reading that user's statistics. The researcher's summary puts it plainly: the flaw was that even if users deactivate their account, the auth token was not getting expired, which allowed third party applications to track user statistics.
The report was rated low severity with a CVSS score of 2.7, classified as Improper Access Control - Generic, and paid a bounty of 250.00 USD. It was disclosed on 2018-09-27. CVSS is a standard scoring system for the seriousness of a security issue; 2.7 is on the low end. Improper Access Control means the software lets someone do something they should no longer be allowed to do.
The report contains no HTTP requests, parameters, headers or response bodies, so there is no traffic to copy and explain line by line here. What we have is the description of the behaviour and the fix.
Why it matters
When you deactivate an account, you expect it to stop. A token that outlives deactivation breaks that expectation: the third party application keeps its access even though you believe you have switched everything off.
In this case the exposure is limited. The report describes access to statistics only, not to account details or to actions on the account. That narrow scope is why the severity is low. The user has signalled that they want the account to stop.
In general, how this kind of bug works
Many applications hand out long-lived credentials for programs rather than people: API keys, personal access tokens, OAuth refresh tokens, signed statistics or feed URLs. These are all variations on the same idea as the cloakroom ticket. The server often stores a scrambled form of the ticket, called a hash, and checks it on each request. The check normally answers one question: is this token real and unexpired?
There is a second question the code can easily forget: is the account behind this token still in good standing? Account lifecycle events are the moments when every credential belonging to the account should stop working. Those events include deactivation, suspension, deletion, password reset and email change. If the code that performs deactivation only flips a flag on the user record, tokens issued earlier keep passing validation. The same gap appears when tokens are cached, when they are checked by a separate service that does not read the account state, or when the token carries its own expiry far in the future and nothing else.
The defences are straightforward in principle: tie token validation to account state, keep a per-account list of tokens so deactivation can revoke everything at once, and treat deactivation as a security event equivalent to logging out everywhere.
In general, how to test for it
- Identify every credential the application issues: API keys, personal access tokens, OAuth tokens, signed URLs, embed or stats tokens, webhook secrets. Look in account settings, developer pages and any feature that authorises a third party.
- Create a test account and generate each credential. Record what each one can access, using it from a separate client with no session cookie. A session cookie is the small piece of data your browser keeps after you log in, so using a separate client without it proves the token alone is doing the work.
- Trigger each lifecycle event in turn: deactivate the account, request deletion, change the password, change the email address, enable or disable two-factor authentication, and log out everywhere.
- After each event, replay the credential against its endpoint. A positive result is a successful response with real account data after the account is deactivated or the credential should have been revoked.
- Also try the reverse: reactivate the account and check whether old tokens come back to life, which suggests the flag is checked nowhere.
Common false positives: the endpoint returning a generic page or cached public data rather than the user's own records; the token being rejected but the client silently falling back to a session cookie; and deactivation flows that are reversible by design, where the product intends the account to return exactly as it was. Confirm the response body actually contains the user's data, and confirm no cookie is present in the replay request.
In general, how it is fixed
- Validate account state on every token-authenticated request, rejecting tokens whose account is deactivated, suspended or deleted.
- Revoke all tokens as part of the deactivation transaction, either by deleting them or by bumping a per-account token version that is checked at validation time.
- Apply the same revocation to password reset, email change and log out of all devices.
- Prefer short-lived tokens with refresh, so a missed revocation path has a bounded window.
- Add regression tests that deactivate an account and assert every issued credential is refused.
In general, where to look
This bug class hides in features that are easy to overlook because they are not part of the main login flow: statistics and analytics sharing, embed tokens, RSS and feed URLs, calendar subscriptions, API keys for integrations, and OAuth applications that a user has authorised. Any settings page with a generate token button is worth a look.
Signals worth watching for include endpoints that accept a token as a query parameter or header and return per-user data, developer or API documentation pages, and account settings screens that mention third party access. Reading the deactivation and deletion flows closely often shows they only touch the user record.
To make a report land, show the full sequence: the token working before deactivation, the deactivation succeeding, and the same token still returning the user's data afterwards, with the response body included. State clearly what data is exposed and what is not, since scope drives severity. A token that only reaches statistics was scored low here.
Glossary
- Token: a string of characters that proves permission, like a cloakroom ticket; whoever holds it gets access without a password.
- Auth token: the specific token in this report, generated by the
Authorize your 3rd party statsfeature so third party applications can read a user's statistics. - Third party application: a program made by someone other than the site, which the user authorises to access their data.
- Request: a program asking a server for something, such as a page or a set of records.
- Response: the server's answer to a request, containing the data or an error.
- Header: extra information sent alongside a request or response, such as the format of the data.
- Parameter: a named value attached to a request, often in the URL, that tells the server what is wanted.
- Endpoint: the specific address on a server that handles a particular kind of request.
- Deactivation: a user switching their account off so it should no longer be usable.
- Expire: stop being valid after a set time or event.
- Revoke: cancel a credential so it no longer works.
- Access control: the rules deciding who is allowed to do what.
- Improper Access Control: a flaw where those rules are missing or wrong, so someone can do something they should not.
- Bearer credential: a credential that grants access to whoever presents it, with no further proof of identity.
- CVSS: a standard scoring system for the seriousness of a security issue; 2.7 is low.
- Severity: how serious an issue is judged to be.
- Bounty: a payment made to a researcher for reporting a valid security issue.
- Hash: a scrambled form of data, stored instead of the original, so the original cannot be read back easily.
- Session cookie: a small piece of data your browser keeps after you log in, which identifies your logged-in session.
- OAuth: a standard way for a user to authorise one application to access their data on another site without sharing a password.
- API key: a credential issued to a program so it can call an application's programming interface.
- Refresh token: a long-lived credential used to obtain new short-lived access tokens.
- Two-factor authentication: logging in with a password plus a second proof, such as a code from a phone.
- False positive: a test result that looks like a bug but is not one.
- Regression test: an automated check that a fixed bug stays fixed.