How Email-Change Token Exposure Led to Access to To Private Repositories
The server returned the email-change confirmation token in the API response that triggered the change, so an attacker could confirm ownership of any email address without access to its inbox. This allowed domain impersonation, exposure of private organisation details, and a possible path to private repositories if an admin approved a join request.
meetcyber.net
Published on meetcyber.net
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
The target is a dev-tooling platform, referred to throughout the report as REDACTED, where an email address doubles as an identity signal. Organizations on the platform use email domains to decide who belongs to them: if your address sits on a company's domain, the platform treats you as a plausible member of that company. That makes the email-change flow a security-sensitive operation, because changing your address is effectively changing which organizations you appear to belong to.
The feature under examination is the standard email-change confirmation. The expected behaviour is the usual one: you request a change, the server sends a confirmation link to the new address, and clicking that link proves you control the inbox. The token in the link is meant to be a secret shared only between the server and the owner of the new mailbox.
Setup
No special accounts, roles or tooling are described beyond a normal account on the platform and the browser's developer tools. The researcher went to the account settings page, started an email change, and watched the Network tab out of habit rather than suspicion. That is the whole precondition: an authenticated session and the ability to read the responses your own browser receives.
Finding it
Starting an email change produced a request to:
/api/user
The JSON returned by that request contained two fields:
{ "newEmail": "<requested_email>", "hash": "<verification_token>"}
The newEmail field is expected. The hash field is not: it is the exact value later used to confirm the change, submitted to this endpoint:
https://api.<redacted>.com/user/confirm-change-email?email=<token>
So the server generated the secret that is supposed to prove the requester received the confirmation email, and then returned that same secret to the browser in the response to the request that triggered the change, before any email had been opened. The token was sitting in a response body the client could read.

Exploitation
Step 1: Request the email change
With an authenticated session, the researcher submitted an email change from the account page. The client called:
/api/user
The response body included the requested address and the verification token in the hash field, as shown above. Nothing else was needed to obtain the token: no access to the new inbox, no interception, no guessing.
Step 2: Submit the token to the confirmation endpoint
The researcher copied the hash value and pasted it into the confirmation URL:
https://api.<redacted>.com/user/confirm-change-email?email=<token>
The researcher pasted the token into the confirmation URL and the endpoint accepted it. The email change went through immediately: no link clicked in a real inbox, no waiting, no second factor. The only thing that would normally stop someone from verifying an address they do not own was absent, because the proof the endpoint wanted had already been handed to the client.
Root cause
This is a sensitive-token-in-client-response mistake. The server generated a confirmation token intended to gate an email change, and instead of sending it only through the email channel it was meant to verify, it echoed the token back in the API response that triggered the change. The confirmation endpoint then trusted whatever token arrived, with no way to distinguish a token the server emailed to the real owner from a token the client already possessed.
The design intent of an email-verification token is that possessing it demonstrates you read an email. Returning it in the same response that requests the change erases that guarantee entirely. The endpoint behaved as a "did the client send back what we gave them" check rather than a proof-of-inbox-access check.
Impact
On its own, confirming an address you do not own sounds minor. The impact comes from the platform's use of email domains to tie people to organizations.
- Private organization enumeration. By changing the account's email domain to match a target company's domain, the app starts disclosing the names of private organizations tied to that domain, how many members each one has, and whether they are on a paid plan. None of that is meant to be public; it is business intelligence about a company's internal tooling footprint, released because the domain field says so.
- A path toward private codebase access. If an organization admin approves a join or access request from an account sitting on "their" domain, which the report notes is not an unreasonable thing for a busy admin to rubber-stamp, the attacker is inside private repositories: source code, inline secrets, internal docs and issue trackers. From there the report points to IP theft, supply-chain risk and credential leakage.
- Possible licence and subscription abuse. If the organization has a paid seat available and the join request is approved, a seat is consumed that should not have been, adding a financial impact on top of the access one.
The repository access path depends on an admin approving the request, and the licence impact depends on a paid seat being available; the report frames both with those conditions. The report says that after the domain change the app starts showing private organization names, member counts and plan status. The report records the severity as P2, Severe.
Fix
The report gives recommendations rather than describing a deployed fix:
- Never include the email-confirmation token in any API response the client can read. It should only ever leave the server inside the actual email sent to the new address.
- Treat the confirmation endpoint as a proof-of-inbox-access check, not a check that the client returned what the server gave it.
- Add rate limiting and anomaly detection around email-change attempts, especially those using domains tied to existing organizations.
- Require admin approval workflows to independently verify domain ownership before granting organization-level visibility or access, rather than trusting a freshly confirmed email alone.
By the time the report was triaged it was already known internally and filed as a duplicate of an earlier report.
Variants to test
- Token echoed in the change-request response. Start an email change and read the response body. A positive result is a field containing the value later accepted by the confirmation endpoint, as happened here.
- Token present elsewhere in the client. Check whether the confirmation token appears in page source, local storage, a subsequent API response, or a redirect URL before the email is opened. Any of these gives the same bypass.
- Confirmation endpoint accepting a client-supplied token without binding it to the session or the address. Submit a token obtained from your own request against a change for a different address. A positive result is the change being confirmed without inbox access.
- Domain-based organization discovery. After confirming an address on a domain you do not control, observe whether private organization names, member counts or plan status become visible. A positive result is any of that data appearing for a domain you have no legitimate claim to.
- Join-request path. With a confirmed address on a target domain, submit a join or access request and see whether it reaches an admin as a plausible member. A positive result is the request being presented as domain-verified rather than flagged for ownership checks.
What happened, in plain words
A website let people change the email address on their account. Normally, changing your email should be a careful process: you ask for the change, the site sends a secret link to the new address, and only someone who can open that inbox can click the link and finish the change. That link is the proof that you really own the new address.
On this platform, the site made a mistake. When you asked to change your email, the site's own reply to your browser already contained the secret code that was supposed to arrive only by email. So you did not need to open any inbox at all. You could read the code straight from the reply your browser received, paste it into the confirmation address, and the change went through.
That sounds small, but the platform used email addresses to decide which companies you belonged to. If your address ended in a company's domain (the part after the @ sign), the platform treated you as a likely member of that company. So being able to confirm an email you did not own meant you could pretend to belong to any company's domain, see private organisations tied to it, and, if an administrator approved a join request, reach private code repositories.
The researcher found this simply by watching the browser's Network tab while changing an email, out of habit. The report was later marked as a duplicate of an earlier one that was already known internally.
The platform and the feature
Throughout the report the platform is called REDACTED. It is a dev-tooling platform: a service that software teams use to help build and manage their work. Like many such services, your email address doubles as your identity. Organisations on the platform use email domains to decide who belongs to them. If your address sits on a company's domain, the platform treats you as a plausible member of that company.
That is why the email-change flow is security-sensitive. Changing your address is effectively changing which organisations you appear to belong to.
The feature being examined is the standard email-change confirmation. The expected behaviour is the usual one:
- You ask to change your email.
- The server sends a confirmation link to the new address.
- You click the link, which proves you control that inbox.
The token in the link is meant to be a secret shared only between the server and the owner of the new mailbox. A token here is just a long random string that acts like a one-time password: whoever has it can prove they were meant to receive it. Think of it as a cloakroom ticket: the person holding the ticket is assumed to be the person who left the coat.
Setting up
No special accounts, roles or tools are described beyond a normal account on the platform and the browser's developer tools. The researcher went to the account settings page, started an email change, and watched the Network tab out of habit rather than suspicion.
The Network tab is a panel built into every modern browser (you open it with the developer tools, usually with F12 or a right-click and "Inspect"). It lists every request the page makes to the server and every reply the server sends back. It is the browser's own diary of the conversation. Anyone can open it; no special software is needed.
That is the whole precondition: an authenticated session (you are logged in) and the ability to read the responses your own browser receives.
Finding it
Starting an email change produced a request to:
/api/user
An API (application programming interface) is the set of addresses a website's pages use to talk to its server behind the scenes. When you click a button, the page usually does not reload; it quietly sends a request to an address like /api/user and gets data back, usually in a format called JSON, which is just structured text made of names and values. The /api/user address is the one that handles information about your user account.
The JSON returned by that request contained two fields:
{ "newEmail": "<requested_email>", "hash": "<verification_token>"}
Line by line:
- The outer braces
{and}mark the start and end of one JSON object, a bundle of named values. "newEmail": "<requested_email>"says which new address was requested. This field is expected: of course the server should tell you what you just asked for."hash": "<verification_token>"is the problem. A hash here is just the name the platform gave to the verification token, the secret code that is supposed to prove you received the confirmation email. The report shows it as a placeholder,<verification_token>, because the real value is a secret.
The newEmail field is expected. The hash field is not: it is the exact value later used to confirm the change, submitted to this endpoint:
https://api.<redacted>.com/user/confirm-change-email?email=<token>
Line by line:
https://is the secure web protocol, the same one your browser shows with a padlock.api.<redacted>.comis the server that handles the platform's API requests. The middle part is hidden in the report./user/confirm-change-emailis the path, the specific action on that server: confirm the email change.?email=<token>is the part after the question mark, called the query string. It carries extra information to the server. Here the parameter is namedemail, but the value placed in it is the token, not an address. The parameter is namedemail, but the value placed in it is the token, not an address.
So the server generated the secret that is supposed to prove the requester received the confirmation email, and then returned that same secret to the browser in the response to the request that triggered the change, before any email had been opened. The token was sitting in a response body the client could read.

Exploitation
Step 1: Request the email change
With an authenticated session, the researcher submitted an email change from the account page. The client called:
/api/user
The response body included the requested address and the verification token in the hash field, as shown above. Nothing else was needed to obtain the token: no access to the new inbox, no interception, no guessing.
Why this step matters: the researcher was not attacking anything yet. They were doing the normal thing a user does, and simply reading the reply. The vulnerability is that the reply contains something it should not.
Step 2: Submit the token to the confirmation endpoint
The researcher copied the hash value and pasted it into the confirmation URL:
https://api.<redacted>.com/user/confirm-change-email?email=<token>
The email query parameter carries the token rather than an address, and the endpoint accepted it. The email change went through immediately: no link clicked in a real inbox, no waiting, no second factor. The only thing that would normally stop someone from verifying an address they do not own was absent, because the proof the endpoint wanted had already been handed to the client.
A second factor is an extra check beyond a password, such as a code from a phone. None was involved here, and none was needed, because the token itself was the check, and it had already been given away.
Root cause
This is a sensitive-token-in-client-response mistake. The server generated a confirmation token intended to gate an email change, and instead of sending it only through the email channel it was meant to verify, it echoed the token back in the API response that triggered the change. The confirmation endpoint then trusted whatever token arrived, with no way to distinguish a token the server emailed to the real owner from a token the client already possessed.
The design intent of an email-verification token is that possessing it demonstrates you read an email. Returning it in the same response that requests the change erases that guarantee entirely. The endpoint behaved as a "did the client send back what we gave them" check rather than a proof-of-inbox-access check.
A useful comparison: a bouncer checking IDs at a door is only useful if the ID is hard to fake. If the bouncer hands you a blank ID card along with your ticket, the check still happens, but it proves nothing.
Impact
On its own, confirming an address you do not own sounds minor. The impact comes from the platform's use of email domains to tie people to organisations.
- Private organisation enumeration. By changing the account's email domain to match a target company's domain, the app starts disclosing the names of private organisations tied to that domain, how many members each one has, and whether they are on a paid plan. None of that is meant to be public; it is business intelligence about a company's internal tooling footprint, released because the domain field says so. Enumeration simply means listing things out, one by one.
- A path toward private codebase access. If an organisation admin approves a join or access request from an account sitting on "their" domain, which the report notes is not an unreasonable thing for a busy admin to rubber-stamp, the attacker is inside private repositories: source code, inline secrets, internal docs and issue trackers. From there the report points to IP theft, supply-chain risk and credential leakage. A repository is a storage place for code and its history; a private repository is one only members can see.
- Possible licence and subscription abuse. If the organisation has a paid seat available and the join request is approved, a seat is consumed that should not have been, adding a financial impact on top of the access one.
The repository access path depends on an admin approving the request, and the licence impact depends on a paid seat being available; the report frames both with those conditions. The report says that after the domain change the app starts showing private organisation names, member counts and plan status. The report records the severity as P2, Severe. Severity ratings like P2 are how bug bounty programmes rank findings, from most to least urgent.
Fix
The report gives recommendations rather than describing a deployed fix:
- Never include the email-confirmation token in any API response the client can read. It should only ever leave the server inside the actual email sent to the new address.
- Treat the confirmation endpoint as a proof-of-inbox-access check, not a check that the client returned what the server gave it.
- Add rate limiting and anomaly detection around email-change attempts, especially those using domains tied to existing organisations. Rate limiting means capping how often someone can try something; anomaly detection means spotting unusual patterns.
- Require admin approval workflows to independently verify domain ownership before granting organisation-level visibility or access, rather than trusting a freshly confirmed email alone.
By the time the report was triaged it was already known internally and filed as a duplicate of an earlier report. Triaged means the programme has looked at the report and sorted it.
Variants to test
These are the same kind of check applied in slightly different places, useful if you want to look for similar mistakes yourself:
- Token echoed in the change-request response. Start an email change and read the response body. A positive result is a field containing the value later accepted by the confirmation endpoint, as happened here.
- Token present elsewhere in the client. Check whether the confirmation token appears in page source, local storage, a subsequent API response, or a redirect URL before the email is opened. Any of these gives the same bypass. Local storage is a small storage area a website keeps inside your browser.
- Confirmation endpoint accepting a client-supplied token without binding it to the session or the address. Submit a token obtained from your own request against a change for a different address. A positive result is the change being confirmed without inbox access.
- Domain-based organisation discovery. After confirming an address on a domain you do not control, observe whether private organisation names, member counts or plan status become visible. A positive result is any of that data appearing for a domain you have no legitimate claim to.
- Join-request path. With a confirmed address on a target domain, submit a join or access request and see whether it reaches an admin as a plausible member. A positive result is the request being presented as domain-verified rather than flagged for ownership checks.
Glossary
- API: the set of addresses a website's pages use to talk to its server behind the scenes, usually exchanging structured data.
- JSON: a plain-text format for structured data, made of names and values in braces.
- Token: a long random string used as a one-time secret to prove you were meant to receive it.
- Verification token: a token sent to an email address to prove the person requesting a change can read that inbox.
- Hash: in this report, the name of the field that carried the verification token.
- Endpoint: a specific address on a server that performs one action, such as confirming an email change.
- Query string: the part of a web address after the question mark, carrying extra named values to the server.
- Parameter: one named value inside a request, such as
emailin the confirmation address. - Network tab: a browser developer tool that lists every request and response between the page and the server.
- Developer tools: the built-in panel in browsers for inspecting pages, requests and code.
- Authenticated session: the state of being logged in, so the server knows which account is making requests.
- Client: the browser and page running on your computer, as opposed to the server.
- Server: the remote computer that stores data and answers requests.
- Response body: the content the server sends back, as opposed to its status or headers.
- Second factor: an extra check beyond a password, such as a code from a phone.
- Domain: the part of an email address after the @ sign, such as a company's name.
- Enumeration: listing things out one by one, often to learn what exists.
- Repository: a storage place for code and its history; a private one is visible only to members.
- Severity (P2): a ranking of how urgent a finding is; P2 is high on the scale, described here as severe.
- Rate limiting: capping how often someone can perform an action.
- Anomaly detection: spotting unusual patterns in activity.
- Triaged: reviewed and sorted by the bug bounty programme.
- Duplicate: a report describing an issue that was already reported.
- Local storage: a small storage area a website keeps inside your browser.