Account Takeover For The Win 🏆
The author found account takeover vulnerabilities in two e-commerce companies' password reset flows, where an attacker could start the reset process and trick the victim into completing it, then take over the account. A bypass after the first fix used a store-hosting feature and Google Analytics to exfiltrate a required ID parameter.
Ricardo Iramar dos Santos Follow
Published on medium.com
#### Ricardo Iramar dos Santos
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
This is an account takeover (ATO) story that spans two large e-commerce companies, both of which run private bug bounty programmes, so the author is not allowed to name them. The first is referred to as Ecom Fake and the second as Exemplo. The author's starting point on any engagement is to understand the business and pick the feature with the biggest impact; authentication features are usually that choice, and they are where the ATOs below came from.
The author's view is that ATO is underestimated both by developers writing the code and by testers assessing it, because most of the ATOs found here were logical flaws that did not need much technical skill, just thinking a little outside the box.
Three separate issues are covered:
- A subdomain takeover chained with an over-permissive cookie
Domainattribute on Ecom Fake, which the programme marked out of scope. - A logical flaw in the "Forgot your password?" flow on Ecom Fake's main application, which the programme treated as low severity.
- A logical flaw in the Google-based account recovery flow on Exemplo, plus a bypass of the fix that used a self-hosted store and Google Analytics for exfiltration.
Setup
The tooling throughout is a browser with a proxy such as Burp, used to intercept and forward requests and to stop on responses. No versions are given.
For the Ecom Fake password reset issue the preconditions are two:
- The attacker needs to know the victim's email and name.
- The victim needs to be tricked into validating their own OTP.
For the Exemplo recovery issue the attacker needs a victim email (the report uses [redacted] as an example) and the ability to send the victim a link. If the victim is already logged in to Google and has previously approved the login on Exemplo, the victim does not even need to log in to Google again.
For the bypass, the attacker additionally needs an account on Exemplo (the report uses [redacted]), the MyStore service activated for that account, and the Google Analytics feature enabled on it.
Finding it
Ecom Fake: subdomain takeover and cookie scope
The entry point was a subdomain takeover under webstore.ecomfake.de. A CNAME pointed webstore.ecomfake.de to internal.notreallyimportant.de, and the root domain notreallyimportant.de was available to buy.

The author calls this a common mistake: DNS administrators publishing internal names on external DNS, where they are supposed to be valid only inside the internal network.
Reporting only the subdomain takeover was unattractive because it can have many different impacts and the programme explicitly made subdomain takeover out of scope. So the author did a quick check of the application to chain the takeover into something with a nicer impact. In under five minutes it was clear that the cookies' domain attribute was too permissive: any logged-in user on www.ecomfake.de (the main application) would send their cookies to the subdomain webstore.ecomfake.de under the attacker's control if the user visited it.
No PoC was created, but the author notes it would be easy for an attacker to include links under www.ecomfake.de or any other subdomain under ecomfake.de and collect the session cookie from every user who opens a page with those links.
The programme initially closed the report with this statement:
Thanks for finding the subdomain takeover, unfortunately, it is out of scope for this project. I will close this ticket as resolved so you don't lose a point.
The author replied:
The subdomain takeover is in the chain but it's not the vulnerability that I'm reporting here. I'm reporting the massive account takeover vulnerability which is possible only because of the cookie domain attribute is too permissive.
After a long discussion the programme fixed the subdomain takeover and closed the report as resolved, but it was not eligible for a bounty. The author suggested making the policy explicit, saying that any issue combined with a subdomain takeover would be invalidated, but the policy was not updated. On the permissive cookie domain the programme said it was a "known generic issue" and would not fix it.
Ecom Fake: password reset logic
The author tried again against the main application at www.ecomfake.com. The authentication mechanism was exactly the same for all of the company's stores around the world. The "Forgot your password?" feature had a logical flaw that allowed an account takeover, with the two preconditions listed above.
Exemplo: Google account recovery logic
A few weeks later a similar ATO turned up at another company, referred to as Exemplo. Here the account recovery feature through Google had a logical flaw: an attacker could start the process and, by phishing, force the user to perform the steps needed to finish the takeover.
Exemplo: the bypass
After the fix, Exemplo asked the author to check whether the issue was properly fixed. The author confirmed the original exploitation no longer worked, but suspected it might be exploitable another way and needed more time. A few weeks later the investigation resumed: the fix added an extra step validating the user email, which made the open redirect used before useless. The new requirement was a specific URL ID parameter. If the attacker could obtain that ID, the attack would work much as before. The problem was how to get it.
Looking at other services from the same company, the author found one where a store could be hosted under the same root domain, referred to as MyStore. MyStore had integrations with Google Analytics, which gave the idea for the exfiltration technique used in the bypass.
Exploitation
Ecom Fake: password reset takeover
The process was not intuitive, so the author sent a video along with the steps:
- Set any proxy tool like Burp in your browser.
- Access
https://www.ecomfake.comand perform the "Forgot your password?" using the victim email. - When the application asks for the OTP, copy the latest URL from the browser address bar.
- Send an email to the victim with the URL from the previous step. A real attacker would write a phishing email such as "We detect a malicious activity in your account. Please reset your password clicking here."
- Keep refreshing the page from step 3 until a different response appears. As soon as the victim provides the OTP code, the attacker is actually loading the next step.
- Provide the victim's name and then the new password before the victim does. This can easily be automated with a Python script to change the password first, since the response reveals when the user has already provided the OTP.
- Log in to the victim's account with the new password.
On step 5, even if the user resends the OTP it still works. The key is tricking the user into loading the URL from step 3 and providing the OTP to reset their own password.
The report was handled by a HackerOne triager, who responded:
I believe the best course of action for this report is for you to self-close this report.
One of the reasons given was:
The policy page explicitly states that this report is out-of-scope as it requires social engineering/phishing a user to exploit.
The author argued back:
The problem here is not the phishing attack but the security issue in how the forgot password feature was designed. From my perspective the forgot password feature should never allow be started from one browser and get part of it process in a different browser session. My suggestion for the solution in this case is when the user access the site for the very first time he should get an anonymous session and any ID for any process must be tied to this session which would prevent this attack. Even that take look the instructions from Ecom Fake regarding phishing attacks. In the video and text they are asking to the user o check if the domain is a real domain from Ecom Fake and in this attack it is from Ecom Fake. Why an user shouldn't trust in a real URL from Ecom Fake? Actually it should trust and that's why the security issue is on the "Forgot your password?" feature in this case.
Ecom Fake defined the ATO as a low severity issue and paid US$125. The author decided not to work with that programme any more.
Exemplo: Google recovery takeover
These are the steps sent to the programme.
- Use
[redacted]as an example. Set up a browser with a proxy tool like Burp and accesshttps://www.exemplo.com.br. - Start the recover account process by providing the email
[redacted]. - On the next screen enable Burp interception and click the account recover feature link.
- In Burp, forward the first POST request and stop on the GET request to:
https://xpto.exemplo.com.br/authentication?id=%7Bid%7D&mail=victim%40gmail.com&redirect_url=%7Bredirect_url%7D
The GET carries three parameters: id, mail (the victim's email, URL-encoded) and redirect_url. The id and redirect_url values are placeholders in the captured request.
- Copy the URL from the GET above and replace the
redirect_urlparameter with:
https%3a//xpto.exemplo.com/xpto%3fgo%3dhttps%253a//exemple.com.ricardo-iramar.com
This is an open redirect pointing to a subdomain under the author's domain, so the attacker can tell when the victim has finished the required steps. It is not strictly required: any invalid exemplo.com subdomain would work too.
- Send the URL from the previous step to the victim with any interesting story (phishing).
- From another browser, open the URL from the fake email to simulate the victim's access and try to recover the account using Google.
- If the user is already logged in to Google and has previously approved the login on Exemplo, this step is not required. Otherwise the victim has to log in to Google.
- In the PoC the page redirects to
https://exemplo.com.ricardo-iramar.com, which has no application and returns a 500 HTTP error. A real attack would redirect the user back tohttps://www.exemplo.com.brand the victim would never know what happened. - If working remotely, the attacker knows the user has finished the required steps by checking the access logs on
https://exemplo.com.ricardo-iramar.com, then simply disables the Burp interception from step 4.
This ATO was almost the same as the previous one but required much less user interaction: if the victim was already logged in to Google/Gmail, just loading the malicious URL made the takeover work transparently. Exemplo rewarded it with US$1,400.
Exemplo: bypassing the fix
- Create a fake account under
https://www.exemplo.com.br(e.g.[redacted]). - Activate MyStore for that account and enable the Google Analytics feature.
- Take the victim email (e.g.
[redacted]), set up a browser with a proxy tool like Burp and accesshttps://www.exemplo.com.br. - Start the recover account process with the victim email and click continue.
- On the next screen enable request and response interception in Burp and click the forgot password link.
- Forward the first POST request and stop on the response, which is a redirection (302 Found). Copy the redirected URL from the
Locationresponse header.

-
Paste the URL into a text file to keep a copy. Replace the
redirect_urlparameter with the MyStore URL created in the first steps. The wholeredirect_urlparameter can be URL-encoded to hide its content from the victim. -
Go back to Burp, drop the response and any following requests to stop the account recovery process.
-
From another browser instance, open the URL from the fake email to simulate the victim's access and try to recover the account using Google.
-
If the user is already logged in to Google and has previously approved the login, this step is not required. Otherwise the victim logs in to Google. At the end the victim is redirected to the MyStore created in the first steps.
-
As the attacker, open the Google Analytics dashboard and go to "Realtime > Overview" in the left panel. Copy the URL parameters under the "Top Active Pages" section.
-
Take the original URL saved in the text file, decode the
redirect_urlparameter and append the parameters extracted from Google Analytics. -
Load the URL from the previous step in the same browser where the recovery process was started.
Because this was a bypass and required more user interaction, Exemplo rewarded it with US$700.
Root cause
Ecom Fake cookie scope. The session cookie's Domain attribute was too permissive, so cookies set for the main application were also sent to webstore.ecomfake.de. Combined with the subdomain takeover, that subdomain was under the attacker's control, so any logged-in user who visited it handed over their session cookie. The programme treated the permissive cookie domain as a known generic issue and did not fix it.
Ecom Fake password reset. The reset flow could be started in one browser and completed in another session. The author's view is that the feature should never allow a process started in one browser to have part of its process completed in a different browser session. The suggested design is to give the user an anonymous session on first access and tie any process ID to that session, which would prevent the attack. The triager's position was that the report required social engineering/phishing and was therefore out of scope; the author's counter is that the phishing link pointed at a genuine Ecom Fake URL, which users are told to trust.
Exemplo recovery. The recovery flow through Google could be started by the attacker and finished by the victim, with the attacker's redirect_url carried through the process. The fix added an extra step validating the user email, which broke the open redirect route and made a specific URL ID parameter necessary. The bypass worked because MyStore let the attacker host content under the same root domain and observe the victim's redirected request through Google Analytics, recovering the parameters needed to complete the flow in the original browser session.
Impact
On Ecom Fake, the cookie issue meant any logged-in user on www.ecomfake.de who followed a link to the taken-over subdomain would send their session cookie to the attacker, giving account takeover. No PoC was built, but the author describes it as easy to arrange through links placed under www.ecomfake.de or any other subdomain of ecomfake.de. The programme fixed the subdomain takeover but paid nothing for the chain and declined to fix the cookie scope.
The Ecom Fake password reset flaw allowed takeover of any account whose email and name the attacker knew, provided the victim could be tricked into validating their own OTP. It was rated low severity and paid US$125.
The Exemplo recovery flaw allowed takeover with minimal interaction: if the victim was already logged in to Google/Gmail, simply loading the malicious URL was enough, and the takeover was transparent. It paid US$1,400. The bypass required more user interaction and paid US$700.
Fix
Ecom Fake fixed the subdomain takeover after the chain was reported, but did not fix the permissive cookie domain, calling it a known generic issue. The author suggested clarifying the policy so that any issue combined with a subdomain takeover would be invalidated; the policy was not updated.
For the password reset flaw the author's proposed fix is an anonymous session on first access, with any process ID tied to that session, so a reset started in one browser cannot be completed in another.
Exemplo added an extra step validating the user email, which stopped the open redirect route and forced the attacker to supply a valid URL ID parameter. The author then bypassed that fix, as described above.
Variants to test
- Permissive cookie
Domainplus a claimable subdomain. Look for cookies scoped to the parent domain and any subdomain whose CNAME points at a name you can register. A positive result is your own server receiving a logged-in user's session cookie when they visit the subdomain. - Reset flows that span sessions. Start a password reset in one browser, copy the URL, and complete it in another. If the second browser can finish the flow, the process is not tied to a session. A positive result is a completed reset from a different browser than the one that started it.
- OTP steps that can be raced. Keep refreshing the step after the OTP prompt and watch for the response changing once the victim submits the code. A positive result is the next step loading in the attacker's browser before the victim finishes.
- Recovery flows with a
redirect_urlparameter. Try replacing it with an external URL or an invalid subdomain of the target. A positive result is a redirect you can observe, or a 500 from a host you control. - Hosted sub-services under the same root domain. Look for store builders, site builders or similar services that let you host content under the target's root domain. A positive result is your content served from a subdomain of the target.
- Analytics as an exfiltration channel. Enable a realtime analytics integration on your hosted content and watch "Top Active Pages" for parameters sent by redirected victims. A positive result is the victim's request parameters appearing in your dashboard.
- Replaying recovered parameters in the original session. Take the parameters observed through analytics, decode the
redirect_url, append them, and load the URL in the browser that started the flow. A positive result is the flow completing and the account being taken over.
What happened, in plain words
This is a story about three security problems found in two large online shops. Both shops run private bug bounty programmes. A bug bounty programme is a deal between a company and independent researchers: if you find a security problem in the company's systems and report it responsibly, the company pays you a reward (a bounty) instead of getting angry. "Private" means you can only take part if you are invited, and you are not allowed to talk publicly about the company's name. That is why the author calls the first shop Ecom Fake and the second one Exemplo. Those are made-up names standing in for the real ones.
The three problems are:
- A subdomain takeover on Ecom Fake, combined with a badly configured cookie, which the programme decided was out of scope (meaning: not eligible for a reward).
- A logical flaw in the "Forgot your password?" feature on Ecom Fake's main website, which the programme treated as low severity and paid only a small amount for.
- A logical flaw in the "recover your account with Google" feature on Exemplo, which paid well, plus a second round after Exemplo tried to fix it, where the author found a way around the fix and was paid again.
A few ideas come up again and again, so let us get them out of the way first.
Account takeover (ATO) means exactly what it sounds like: an attacker ends up in control of somebody else's account, able to read their data and act as them. It is one of the worst things that can happen on a shopping site, because the account usually has saved addresses, payment details and order history.
Authentication is the process of proving who you are when you log in. A logical flaw is a mistake in the rules of a feature rather than in the code that runs it. Think of a form that asks for a stamp from an official: the ink and paper are fine, but the clerk accepts a stamp from the wrong desk. Nothing crashes, nothing looks broken, and yet the rule can be bent. The author's point is that most of the takeovers here were logical flaws, not deep technical exploits. They did not need much skill, just thinking a little outside the box.
Phishing is tricking a person into doing something by sending them a link or message that looks trustworthy. It is the human side of an attack, and it matters here because both companies argued that phishing was the real problem, while the author argued that the flaw was in how the feature was designed.
The author's habit on any test is to start by understanding the business, then pick the feature with the biggest impact. Authentication features are usually that choice, and that is where all three findings came from.
The tools and the setup
Everything here was done with an ordinary browser plus a proxy. A proxy is a program that sits between your browser and the website. Instead of the browser talking straight to the server, it talks to the proxy, and the proxy passes the message on. Because everything passes through it, the proxy can pause each message, show it to you, let you change it, and then either send it on (forward) or throw it away (drop). The proxy used throughout is called Burp, and the report gives no version numbers.
Two more words you will see constantly:
- A request is the message your browser sends to a server, for example "please show me the login page".
- A response is the server's reply, for example the page itself, or an instruction to go somewhere else.
A POST request is a request that carries data in its body, typically used when you submit a form. A GET request is a request that carries its data in the URL itself, typically used when you simply open a page. A 302 Found is a response that means "the thing you asked for is over there, go to this other address instead". The other address is given in a response header called Location. A header is a small labelled line of extra information attached to a request or response, separate from the page content.
A cookie is a small piece of text that a website asks your browser to store and to send back on every later visit to that site. It is how a site remembers that you are logged in: the cookie is effectively your wristband at a festival. If somebody else gets a copy of your wristband, they can walk around as you. A session cookie is exactly that kind of cookie, the one tied to your logged-in session.
A CNAME is a DNS record. DNS is the internet's address book: it turns a name like www.example.com into the numeric address of a server. A CNAME says "this name is really just another name for that other name", like a forwarding note on a letter. A subdomain is a name that sits under a main domain: in webstore.ecomfake.de, the main domain is ecomfake.de and webstore is the subdomain.
A subdomain takeover happens when a subdomain points (via a CNAME) at a name that nobody owns any more, and an attacker buys that name. The company's subdomain then quietly starts serving the attacker's content, while still looking like the company's own address. It is like a shop putting up a sign saying "our storeroom is at 12 Main Street", and 12 Main Street being empty and for sale.
An OTP is a one-time password: the short code sent by email or text that you type in to prove it is really you. URL encoding is the way special characters are written inside a web address so they do not break it: for example %40 means @, %3a means :, %2f means / and %3f means ?. An open redirect is a feature that takes a web address as a parameter and sends the visitor there afterwards. If it does not check where it is sending people, an attacker can use the company's own trusted link to send victims to the attacker's site.
Finally, Google Analytics is a free service that website owners use to see how many people visit and which pages they look at. It has a "Realtime" view that shows pages being viewed right now. Keep that in mind: it becomes the trick at the end of the story.
Finding the first problem: a subdomain takeover on Ecom Fake
The entry point was a subdomain takeover under webstore.ecomfake.de. A CNAME pointed webstore.ecomfake.de to internal.notreallyimportant.de, and the root domain notreallyimportant.de was available to buy.

The author calls this a common mistake: DNS administrators publishing internal names on external DNS, where those names are supposed to be valid only inside the internal network. In other words, a name meant for the company's private corridors was written on the public front door, and nobody had bought it.
Reporting only the subdomain takeover was unattractive for two reasons. First, a takeover can have many different impacts, so on its own it is a vague finding. Second, the programme explicitly made subdomain takeover out of scope. So the author did a quick check of the application to chain the takeover into something with a nicer impact. Chaining means combining two weaknesses so that the result is worse than either one alone.
In under five minutes it was clear that the cookies' domain attribute was too permissive. The domain attribute on a cookie tells the browser which addresses the cookie may be sent to. If it is set to the main domain, the browser sends that cookie to the main site and to every subdomain of it. That is convenient for the company, and dangerous when one of those subdomains is under an attacker's control. Any logged-in user on www.ecomfake.de (the main application) would send their cookies to the subdomain webstore.ecomfake.de under the attacker's control if the user visited it.
No proof of concept was created. A proof of concept (PoC) is a small demonstration that shows a problem is real, usually the minimum needed to make it happen. The author notes it would be easy for an attacker to include links under www.ecomfake.de or any other subdomain under ecomfake.de and collect the session cookie from every user who opens a page with those links. Think of it as leaving a stack of leaflets in the shop that all point to the attacker's stall, where the wristband is copied.
The programme initially closed the report with this statement:
Thanks for finding the subdomain takeover, unfortunately, it is out of scope for this project. I will close this ticket as resolved so you don't lose a point.
The author replied:
The subdomain takeover is in the chain but it's not the vulnerability that I'm reporting here. I'm reporting the massive account takeover vulnerability which is possible only because of the cookie domain attribute is too permissive.
After a long discussion the programme fixed the subdomain takeover and closed the report as resolved, but it was not eligible for a bounty. The author suggested making the policy explicit, saying that any issue combined with a subdomain takeover would be invalidated, but the policy was not updated. On the permissive cookie domain the programme said it was a "known generic issue" and would not fix it. A policy here is the programme's written rulebook: what counts, what does not, and what gets paid.
Trying again: the password reset on Ecom Fake
The author tried again against the main application at www.ecomfake.com. The authentication mechanism was exactly the same for all of the company's stores around the world, so a flaw found in one place would work in many. The "Forgot your password?" feature had a logical flaw that allowed an account takeover.
There were only two requirements for a successful attack:
- The attacker needs to know the victim's email and name.
- The victim needs to be tricked into validating their own OTP.
That second point is the heart of it. The victim is not giving the attacker a password. The victim is doing the normal, sensible thing of typing the code that arrived in their own inbox. The flaw is that the process does not stay tied to the browser that started it.
The process was not intuitive, so the author sent a video along with the steps:
- Set any proxy tool like Burp in your browser.
- Access
https://www.ecomfake.comand perform the "Forgot your password?" using the victim email. - When the application asks for the OTP, copy the latest URL from the browser address bar.
- Send an email to the victim with the URL from the previous step. A real attacker would write a phishing email such as "We detect a malicious activity in your account. Please reset your password clicking here."
- Keep refreshing the page from step 3 until a different response appears. As soon as the victim provides the OTP code, the attacker is actually loading the next step.
- Provide the victim's name and then the new password before the victim does. This can easily be automated with a Python script to change the password first, since the response reveals when the user has already provided the OTP.
- Log in to the victim's account with the new password.
Why each step matters:
- Step 1 puts the proxy in place so the author can see and pause every message.
- Step 2 starts a password reset for somebody else's address. The site has no way to know it is not the victim sitting there, because the reset is started by anyone who knows the email.
- Step 3 captures the address of the page that is asking for the OTP. That address is the handle on the half-finished reset.
- Step 4 is the phishing part: the victim receives a link that genuinely belongs to Ecom Fake, which is exactly why it looks trustworthy.
- Step 5 is the race. The attacker's browser sits on the OTP page, refreshing. The moment the victim types the code, the server moves the process forward, and the attacker's browser, refreshing the same address, lands on the next step too.
- Step 6 is the finish: the attacker supplies the victim's name and a new password before the victim gets there. The author notes this can be automated with a Python script, because the response tells you when the OTP has been accepted.
- Step 7 is the payoff: log in with the password the attacker just set.
On step 5, even if the user resends the OTP it still works. The key is tricking the user into loading the URL from step 3 and providing the OTP to reset their own password.
The report was handled by a HackerOne triager. A triager is the person at the bug bounty platform who reads incoming reports first and decides whether they go to the company. That person responded:
I believe the best course of action for this report is for you to self-close this report.
One of the reasons given was:
The policy page explicitly states that this report is out-of-scope as it requires social engineering/phishing a user to exploit.
Social engineering means manipulating a person rather than a machine. The author argued back:
The problem here is not the phishing attack but the security issue in how the forgot password feature was designed. From my perspective the forgot password feature should never allow be started from one browser and get part of it process in a different browser session. My suggestion for the solution in this case is when the user access the site for the very first time he should get an anonymous session and any ID for any process must be tied to this session which would prevent this attack. Even that take look the instructions from Ecom Fake regarding phishing attacks. In the video and text they are asking to the user o check if the domain is a real domain from Ecom Fake and in this attack it is from Ecom Fake. Why an user shouldn't trust in a real URL from Ecom Fake? Actually it should trust and that's why the security issue is on the "Forgot your password?" feature in this case.
The argument in plain words: the company tells users to check that the address is a real Ecom Fake address before typing anything. In this attack the address is a real Ecom Fake address. So the advice the company gives its own users does not protect them, and the fault is in the design of the reset feature. The suggested design is to give every visitor an anonymous session on first arrival, and tie any process ID to that session, so a reset started in one browser cannot be finished in another.
Ecom Fake defined the ATO as a low severity issue and paid US$125. The author decided not to work with that programme any more.
A better result: Google account recovery on Exemplo
A few weeks later a similar ATO turned up at another company, referred to as Exemplo. Here the account recovery feature through Google had a logical flaw: an attacker could start the process and, by phishing, force the user to perform the steps needed to finish the takeover. "Recover your account with Google" means the site trusts Google to confirm who you are, so you click a button, Google confirms you are already signed in, and the site lets you back in.
These are the steps sent to the programme.
- Use
[redacted]as an example. Set up a browser with a proxy tool like Burp and accesshttps://www.exemplo.com.br. - Start the recover account process by providing the email
[redacted]. - On the next screen enable Burp interception and click the account recover feature link.
- In Burp, forward the first POST request and stop on the GET request to:
https://xpto.exemplo.com.br/authentication?id=%7Bid%7D&mail=victim%40gmail.com&redirect_url=%7Bredirect_url%7D
Line by line, this address says:
https://xpto.exemplo.com.br/authenticationis the page on Exemplo's server that handles the authentication step.xptois a placeholder name for one of the company's subdomains.?starts the list of parameters, and&separates them.id=%7Bid%7Dis theidparameter.%7Band%7Dare URL encodings of{and}, so the value is the placeholder{id}: in the captured request this is a stand-in for a real identifier.mail=victim%40gmail.comis themailparameter, holding the victim's email address.%40is the encoded@.redirect_url=%7Bredirect_url%7Dis theredirect_urlparameter, again a placeholder, meaning "where to send the visitor when this is done".
So the GET carries three parameters: id, mail and redirect_url. The id and redirect_url values are placeholders in the captured request.
- Copy the URL from the GET above and replace the
redirect_urlparameter with:
https%3a//xpto.exemplo.com/xpto%3fgo%3dhttps%253a//exemple.com.ricardo-iramar.com
This is an open redirect pointing to a subdomain under the author's domain, so the attacker can tell when the victim has finished the required steps. Reading it in plain words: https%3a is an encoded https:, then //xpto.exemplo.com/xpto is a page on Exemplo, then %3f is an encoded ? starting that page's own parameters, go%3d is an encoded go=, and https%253a is a double-encoded https:, followed by //exemple.com.ricardo-iramar.com, the author's own address. The point is that the redirect starts on a genuine Exemplo address and ends on the author's server. It is not strictly required: any invalid exemplo.com subdomain would work too.
- Send the URL from the previous step to the victim with any interesting story (phishing).
- From another browser, open the URL from the fake email to simulate the victim's access and try to recover the account using Google.
- If the user is already logged in to Google and has previously approved the login on Exemplo, this step is not required. Otherwise the victim has to log in to Google.
- In the PoC the page redirects to
https://exemplo.com.ricardo-iramar.com, which has no application and returns a 500 HTTP error. A 500 is the server's way of saying "something went wrong on my side". A real attack would redirect the user back tohttps://www.exemplo.com.brand the victim would never know what happened. - If working remotely, the attacker knows the user has finished the required steps by checking the access logs on
https://exemplo.com.ricardo-iramar.com, then simply disables the Burp interception from step 4. Access logs are the server's own diary of every request it received.
This ATO was almost the same as the previous one but required much less user interaction: if the victim was already logged in to Google/Gmail, just loading the malicious URL made the takeover work transparently. Exemplo rewarded it with US$1,400.
Getting around the fix
After the fix, Exemplo asked the author to check whether the issue was properly fixed. The author confirmed the original exploitation no longer worked, but suspected it might be exploitable another way and needed more time. A few weeks later the investigation resumed: the fix added an extra step validating the user email, which made the open redirect used before useless. The new requirement was a specific URL ID parameter. If the attacker could obtain that ID, the attack would work much as before. The problem was how to get it.
Looking at other services from the same company, the author found one where a store could be hosted under the same root domain, referred to as MyStore. MyStore had integrations with Google Analytics, which gave the idea for the exfiltration technique used in the bypass. Exfiltration means getting data out of a place you cannot read directly, through some side channel. Here the side channel is the analytics dashboard.
- Create a fake account under
https://www.exemplo.com.br(e.g.[redacted]). - Activate MyStore for that account and enable the Google Analytics feature.
- Take the victim email (e.g.
[redacted]), set up a browser with a proxy tool like Burp and accesshttps://www.exemplo.com.br. - Start the recover account process with the victim email and click continue.
- On the next screen enable request and response interception in Burp and click the forgot password link.
- Forward the first POST request and stop on the response, which is a redirection (302 Found). Copy the redirected URL from the
Locationresponse header.

-
Paste the URL into a text file to keep a copy. Replace the
redirect_urlparameter with the MyStore URL created in the first steps. The wholeredirect_urlparameter can be URL-encoded to hide its content from the victim. -
Go back to Burp, drop the response and any following requests to stop the account recovery process.
-
From another browser instance, open the URL from the fake email to simulate the victim's access and try to recover the account using Google.
-
If the user is already logged in to Google and has previously approved the login, this step is not required. Otherwise the victim logs in to Google. At the end the victim is redirected to the MyStore created in the first steps.
-
As the attacker, open the Google Analytics dashboard and go to "Realtime > Overview" in the left panel. Copy the URL parameters under the "Top Active Pages" section.
-
Take the original URL saved in the text file, decode the
redirect_urlparameter and append the parameters extracted from Google Analytics. -
Load the URL from the previous step in the same browser where the recovery process was started.
Why each step matters:
- Steps 1 and 2 give the attacker a legitimate piece of Exemplo's own infrastructure, a store under the company's root domain, with analytics watching it. That is the observation post.
- Steps 3 to 6 capture the real redirect that Exemplo produces, including the
IDthe fix now demands. The attacker never has to guess it: the server hands it over in theLocationheader. - Step 7 swaps the destination for the attacker's store, so that when the victim finishes, they land somewhere the attacker can watch. Encoding the parameter hides the destination from anyone reading the link.
- Step 8 stops the attacker's own browser from finishing the process, so the half-finished recovery stays waiting for the victim.
- Steps 9 to 11 are the phishing and the victim's side: the victim clicks, signs in with Google, and is sent to the attacker's store. Because the store is under Exemplo's own root domain, nothing looks wrong.
- Step 12 is the trick. When the victim's browser lands on the store, the address it requested is recorded by Google Analytics. The attacker reads those parameters from the Realtime view, which is a live list of pages being viewed.
- Step 13 puts the pieces together: the original URL from the text file, with the
redirect_urldecoded, plus the parameters just recovered from analytics. - Step 14 loads that combined URL in the same browser that started the recovery, which completes the process and takes over the account.
Because this was a bypass and required more user interaction, Exemplo rewarded it with US$700.
Why it worked
Ecom Fake cookie scope. The session cookie's Domain attribute was too permissive, so cookies set for the main application were also sent to webstore.ecomfake.de. Combined with the subdomain takeover, that subdomain was under the attacker's control, so any logged-in user who visited it handed over their session cookie. The programme treated the permissive cookie domain as a known generic issue and did not fix it.
Ecom Fake password reset. The reset flow could be started in one browser and completed in another session. The author's view is that the feature should never allow a process started in one browser to have part of its process completed in a different browser session. The suggested design is to give the user an anonymous session on first access and tie any process ID to that session, which would prevent the attack. The triager's position was that the report required social engineering/phishing and was therefore out of scope; the author's counter is that the phishing link pointed at a genuine Ecom Fake URL, which users are told to trust.
Exemplo recovery. The recovery flow through Google could be started by the attacker and finished by the victim, with the attacker's redirect_url carried through the process. The fix added an extra step validating the user email, which broke the open redirect route and made a specific URL ID parameter necessary. The bypass worked because MyStore let the attacker host content under the same root domain and observe the victim's redirected request through Google Analytics, recovering the parameters needed to complete the flow in the original browser session.
What it meant in practice
On Ecom Fake, the cookie issue meant any logged-in user on www.ecomfake.de who followed a link to the taken-over subdomain would send their session cookie to the attacker, giving account takeover. No PoC was built, but the author describes it as easy to arrange through links placed under www.ecomfake.de or any other subdomain of ecomfake.de. The programme fixed the subdomain takeover but paid nothing for the chain and declined to fix the cookie scope.
The Ecom Fake password reset flaw allowed takeover of any account whose email and name the attacker knew, provided the victim could be tricked into validating their own OTP. It was rated low severity and paid US$125.
The Exemplo recovery flaw allowed takeover with minimal interaction: if the victim was already logged in to Google/Gmail, simply loading the malicious URL was enough, and the takeover was transparent. It paid US$1,400. The bypass required more user interaction and paid US$700.
What was fixed
Ecom Fake fixed the subdomain takeover after the chain was reported, but did not fix the permissive cookie domain, calling it a known generic issue. The author suggested clarifying the policy so that any issue combined with a subdomain takeover would be invalidated; the policy was not updated.
For the password reset flaw the author's proposed fix is an anonymous session on first access, with any process ID tied to that session, so a reset started in one browser cannot be completed in another.
Exemplo added an extra step validating the user email, which stopped the open redirect route and forced the attacker to supply a valid URL ID parameter. The author then bypassed that fix, as described above.
Things worth trying yourself
These are the patterns to look for, written as checks you can carry out with a browser and a proxy.
- Permissive cookie
Domainplus a claimable subdomain. Look for cookies scoped to the parent domain and any subdomain whose CNAME points at a name you can register. A positive result is your own server receiving a logged-in user's session cookie when they visit the subdomain. - Reset flows that span sessions. Start a password reset in one browser, copy the URL, and complete it in another. If the second browser can finish the flow, the process is not tied to a session. A positive result is a completed reset from a different browser than the one that started it.
- OTP steps that can be raced. Keep refreshing the step after the OTP prompt and watch for the response changing once the victim submits the code. A positive result is the next step loading in the attacker's browser before the victim finishes.
- Recovery flows with a
redirect_urlparameter. Try replacing it with an external URL or an invalid subdomain of the target. A positive result is a redirect you can observe, or a 500 from a host you control. - Hosted sub-services under the same root domain. Look for store builders, site builders or similar services that let you host content under the target's root domain. A positive result is your content served from a subdomain of the target.
- Analytics as an exfiltration channel. Enable a realtime analytics integration on your hosted content and watch "Top Active Pages" for parameters sent by redirected victims. A positive result is the victim's request parameters appearing in your dashboard.
- Replaying recovered parameters in the original session. Take the parameters observed through analytics, decode the
redirect_url, append them, and load the URL in the browser that started the flow. A positive result is the flow completing and the account being taken over.
Glossary
- Account takeover (ATO): an attacker gains control of somebody else's account and can act as them.
- Access logs: a server's record of every request it has received.
- Authentication: the process of proving who you are when you log in.
- Bug bounty programme: a scheme where a company pays researchers for reporting security problems responsibly. A private one is invitation-only and keeps the company's name confidential.
- Burp: a proxy tool used to pause, inspect, change, forward or drop the messages between a browser and a website.
- Chaining: combining two weaknesses so the combined result is worse than either alone.
- CNAME: a DNS record saying that one name is really another name.
- Cookie: a small piece of text a site asks your browser to store and send back on later visits, often used to remember that you are logged in.
- DNS: the internet's address book, turning names into server addresses.
- Domain attribute: the part of a cookie that says which addresses the cookie may be sent to. Set to a main domain, it also covers every subdomain.
- Drop: in a proxy, to throw a message away instead of sending it on.
- Exfiltration: getting data out of a place you cannot read directly, through a side channel.
- Forward: in a proxy, to send a paused message on to its destination.
- GET request: a request that carries its data in the URL, typically used when opening a page.
- Google Analytics: a service that records visits to a website and shows them, including a live Realtime view.
- Header: a small labelled line of extra information attached to a request or response, such as
Location. - HackerOne: the bug bounty platform through which the Ecom Fake report was submitted.
- Location header: the response header that gives the address a 302 redirect points to.
- Logical flaw: a mistake in the rules of a feature rather than in the code that runs it.
- MyStore: the made-up name for Exemplo's service that let a user host a store under the company's root domain.
- Open redirect: a feature that sends the visitor to an address supplied in a parameter, without checking where that address leads.
- OTP (one-time password): a short code sent to you to prove it is really you, valid once.
- Phishing: tricking a person into clicking a link or doing something by making the message look trustworthy.
- Policy: a bug bounty programme's written rulebook of what counts and what gets paid.
- POST request: a request that carries data in its body, typically used when submitting a form.
- Proof of concept (PoC): a small demonstration showing that a problem is real.
- Proxy: a program that sits between your browser and a website, letting you see and change the messages.
- Request: the message a browser sends to a server.
- Response: the server's reply to a request.
- Session cookie: the cookie that identifies your logged-in session.
- Severity: how serious a security problem is judged to be, which usually drives the reward.
- Social engineering: manipulating a person rather than a machine.
- Subdomain: a name sitting under a main domain, such as
webstoreunderecomfake.de. - Subdomain takeover: taking control of a company subdomain because it points at a name nobody owns and you can buy it.
- 302 Found: a response meaning "go to this other address instead", given in the
Locationheader. - 500: a response meaning something went wrong on the server's side.
- Triager: the person at a bug bounty platform who first reads a report and decides whether it goes to the company.
- URL encoding: writing special characters in a web address in a safe form, such as
%40for@.