Password Reset Vulnerability to Full Account Takeover
The password reset endpoint returned a newly generated temporary password in plaintext within a response field, allowing an attacker who knew a target email to obtain the credential and log in as that user. The author also noted a separate user enumeration issue on the login page that remained unfixed after the reset flow was changed.
Published on medium.com
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 was a live booking and CRM platform. To keep responsible disclosure for adjacent issues that remained open, the author refers to it throughout as xyz.com. The affected feature is the account recovery flow: the password reset form at /mobile/pwdrst.php, which submits to /login/process_login.php and loads a client-side script at /login/sha512.js to compute a SHA-512 hash of the password in the browser before submission.
The flaw was a logic error rather than a server misconfiguration. When a reset was triggered, the endpoint returned a newly generated temporary password to the client in a POST field named password_to_print. Anyone who could trigger a reset for a known email address could read the plaintext credential straight out of the response, without access to the victim's inbox.

Setup
No special accounts or tooling are described beyond a proxy such as Burp Suite, or the browser's view-source: view, to inspect the reset response. The precondition is simply a valid target email address, or knowledge of the platform's administrative naming conventions. The author describes the takeover as unauthenticated.
Finding it
The author describes the bug as an architectural anti-pattern: password hashing was executed in the client browser rather than on the server. Because the server expected a pre-computed hash from the client, the plaintext temporary credential had to exist in client-side state at some point in the flow. Once a secret enters an execution space controlled by an external actor, such as an intercepting proxy or the browser DOM, it must be treated as compromised.
The reset form routes to /login/process_login.php and loads /login/sha512.js, which calculates the hash and passes it into a custom block:
<input type='hidden' name='password' id='password' class='login_input_text'/><input type='submit' value='Login' onclick='formhash(this.form, this.form.password);' class='login_button_input' />
Because the temporary password was not generated and hashed server-side and dispatched purely out-of-band, the backend passed the raw value to the client framework for local hashing. That forced the plaintext string into a hidden DOM input element, password_to_print, leaking it into the outgoing response and the subsequent POST request.
The author frames this as treating the user's browser as a trusted execution environment. Client-side processing does not hide secrets from whoever supervises the endpoint framework.
Exploitation
Step 1: Identify a target
Find a valid email address, or use administrative account naming conventions.
Step 2: Trigger the reset
Send a standard password reset request for the chosen account.
Step 3: Capture the response
Intercept the response with a proxy, or inspect the rendered document source with view-source:, and read the plaintext value in the password_to_print parameter.
Step 4: Authenticate
Log in immediately with the intercepted temporary password, completing the takeover before the legitimate owner checks their email.
The author's detection methodology is the same sequence: trigger the reset, intercept the response or view the source, and scan for hidden inputs or script-calculated values that sit alongside the normal password parameters, for example password_to_print, formhash(), _hash and _temp.
Root cause
The server generated a temporary password but handed the raw value to the client so the browser could hash it locally. The plaintext therefore appeared in a hidden input named password_to_print in the response, and again in the POST that followed. Hashing in the browser gave no protection because the client already possessed the secret. The design itself was the weakness.
Impact
An unauthenticated attacker who knows a target email address can obtain a working temporary password and take over the account, including administrative accounts if their naming can be guessed. The only condition is that the attacker acts before the legitimate owner uses the emailed notification. The author describes this as a full account takeover.
Fix
About two months after direct escalation, the platform changed the flow to an email-delivered link design, matching the recommendations in the report. The author's remediation blueprint section repeats the exploitation steps rather than listing separate fixes. About two months after direct escalation, the platform changed the flow to an email-delivered link design.
Disclosure timeline
- Initial report to a third-party bug bounty triage platform: closed as Incapable of Reproduction.
- Secondary appeal with a refined proof of concept: closed under the same status.
- Direct escalation to the vendor's primary engineering support queue with raw logs, a replication manual and remediation guidance: no direct reply.
- Verification audit roughly 60 days later: the legacy logic had been replaced by a link-validation architecture. The fix was silent, with no acknowledgment or credit.
The canary: checking patch thoroughness
During scoping, the author noticed a second issue: verbose, differential login errors. An invalid user returned:
Your Email is not Registered - Please Register
He judged this a lower-severity business logic issue and deliberately withheld it from the original report as a telemetry marker. Since the vendor was never told about it, it could show whether the eventual fix came from a broad security review or a narrow patch on the reported endpoint.
To test it, he followed a common convention: large platforms use predictable aliases such as [redacted], and business portals often create administrative addresses from standard prefixes on their own domain. A localised alert on the page reading Cookies must be on to use [domain] helped him infer the structure, and he tried [redacted]. The login module returned a different message:
Wrong Password
That confirmed the guessed account existed, narrowing an attacker's work to password cracking or credential stuffing. After the patch, the reset leak was gone but the login form still distinguished an unregistered username from a valid account with a wrong password. In the author's view, the vendor fixed only the variables named in the report rather than auditing the identity and access management stack.
Variants to test
- Hidden credential fields in reset responses. Trigger a reset and search the response for fields such as
password_to_print,_tempor_hash. A positive result is a plaintext or reversible temporary credential you can log in with. - Client-side hashing of server-generated secrets. Look for scripts like
sha512.jsandformhash()handling passwords. A positive result is the raw secret appearing in the DOM or request before hashing. - Differential login errors. Submit a non-existent user and then a real user with a wrong password. A positive result is two distinct messages, as with
Your Email is not Registered - Please RegisterversusWrong Password. - Predictable administrative aliases. Try standard prefixes such as
admin@,support@orinfo@on the target domain. A positive result is a different error for the guessed address, confirming the account exists.
What happened, in plain words
A security researcher found a way to take over any account on a live booking and customer-management website without knowing the victim's password and without ever reading the victim's email. The site is called xyz.com throughout the write-up so that other problems still open on the same platform are not exposed.
The feature at fault is the "forgot my password" flow. Normally, when you ask a site to reset your password, the site sends a secret link or a temporary password to your email inbox. Only you can read that email, so only you can finish the reset. Here, the site did generate a temporary password, but it also sent that password back to whoever asked for the reset, inside the web page's own response. Anyone who knew your email address could ask for a reset, read the temporary password out of the reply, and log in as you straight away.
The researcher reported it, was rejected twice by the bug bounty triage platform, then emailed the company's engineering support directly. About two months later the site quietly changed to the normal email-link design. There was no reply, no credit and no public acknowledgement.

The target and the feature
A booking and CRM platform is software that businesses use to manage appointments, customers and sales leads. It holds personal data and staff accounts, so account takeover there matters.
The affected feature is account recovery, also called password reset. The reset form lives at /mobile/pwdrst.php. When you submit it, the data goes to /login/process_login.php. The page also loads a small program (a script) from /login/sha512.js, which runs inside your browser and turns your password into a long scrambled string called a hash before sending it.
A hash is a one-way scramble: the same input always gives the same output, but you cannot turn the output back into the input. Sites sometimes hash passwords in the browser so the real password never travels over the network in readable form. That idea only works if the browser is trustworthy, and the browser belongs to whoever is using it.
The researcher calls the bug a logic error rather than a server misconfiguration. A misconfiguration is a setting left wrong, such as a folder that should be private being publicly readable. A logic error is the program doing exactly what it was written to do, but the design itself is unsafe.
Setting up
No special accounts or tools are needed beyond two things most people already have:
- A proxy such as Burp Suite. A proxy sits between your browser and the website and lets you read and edit every request and response. Think of it as a mail interception service: the letter still arrives, but you get to open it first.
- The browser's own
view-source:view, which shows the raw HTML a page was built from. HTML is the language web pages are written in; the hidden parts of a form are visible there.
The only precondition is a valid email address on the target, or knowledge of how the platform names its administrative accounts. The researcher notes the reset could be triggered without being logged in at all, which is normal for a forgot-password form.
Finding it
The researcher describes the bug as an architectural anti-pattern. Architecture here means how the pieces of the application are arranged and which piece is trusted to do what. An anti-pattern is a common design choice that looks reasonable but is known to be unsafe.
The unsafe choice: the password hashing happened in the visitor's browser instead of on the server. Because the server expected to receive an already-hashed value from the browser, the plain, readable temporary password had to exist inside the browser at some point. Anything that reaches the browser is controlled by the person using the browser, including anyone with a proxy. A secret that enters that space must be treated as already stolen.
The reset form submits to /login/process_login.php and loads /login/sha512.js, which computes the hash and hands it to a custom block of code:
<input type='hidden' name='password' id='password' class='login_input_text'/><input type='submit' value='Login' onclick='formhash(this.form, this.form.password);' class='login_button_input' />
Line by line:
<input type='hidden' name='password' id='password' class='login_input_text'/>is a form field that the visitor cannot see.type='hidden'means hidden;name='password'is the label the server uses to find the value;id='password'lets other code on the page refer to it;class='login_input_text'only affects styling.<input type='submit' value='Login' ... />is the button.value='Login'is the text shown on it.onclick='formhash(this.form, this.form.password);'says: when the button is clicked, run the functionformhash, passing it the form and the password field.formhashis defined insha512.jsand is what turns the password into a hash before sending.
Because the temporary password was not generated and hashed on the server and then sent only by email, the backend handed the raw value to the browser so the browser could do the hashing. That forced the readable password into a hidden field in the page, named password_to_print. It therefore appeared in the response the server sent back, and again in the next request the browser sent.
The researcher frames this as treating the visitor's browser as a trusted place to run code. It is not. Whatever runs in the browser can be watched by whoever is using it.
Exploitation
Step 1: Identify a target
Find a valid email address on the site, or guess one using the platform's administrative naming conventions. Naming conventions are the habits companies follow when creating accounts, such as always using admin@ or support@ in front of the domain.
Step 2: Trigger the reset
Send a normal password reset request for that account.
Step 3: Capture the response
Use a proxy to read the reply, or open the page source with view-source:, and look for the readable value in the password_to_print parameter. A parameter is a named piece of data passed between browser and server, like a labelled box on a form.
Step 4: Authenticate
Log in immediately with the temporary password you just read, before the real owner opens their email. That completes the takeover.
The researcher's detection method is the same sequence, and it needs no scanners: trigger the reset, intercept the response or view the source, and scan for hidden fields or script-calculated values sitting next to the normal password fields. Examples to look for are password_to_print, formhash(), _hash and _temp.
Root cause
The server created a temporary password but gave the raw value to the browser so the browser could hash it locally. The readable password therefore appeared in a hidden field named password_to_print in the response, and again in the request that followed. Hashing in the browser gave no protection, because the browser already had the secret before hashing it. The design itself was the weakness.
Impact
Someone who is not logged in and knows a target email address can obtain a working temporary password and take over the account. That includes administrative accounts if their names can be guessed. The only condition is acting before the real owner uses the emailed notification. The researcher calls this a full account takeover.
Fix
About two months after the direct escalation, the platform changed the flow to an email-delivered link design. The report's remediation section repeats the exploitation steps rather than listing separate fixes, so the concrete recommendation is the link-based reset that was eventually deployed.
Disclosure timeline
- Initial report to a third-party bug bounty triage platform: closed as Incapable of Reproduction. Triage is the first stage where a platform checks whether a report is real and in scope.
- Secondary appeal with a refined proof of concept: closed under the same status. A proof of concept is a small, repeatable demonstration that the bug works.
- Direct escalation to the vendor's primary engineering support queue with raw logs, a replication manual and remediation guidance: no direct reply.
- Verification audit roughly 60 days later: the old logic had been replaced by a link-validation design. The fix was silent, with no acknowledgement or credit.
The canary: checking patch thoroughness
During early scoping, the researcher noticed a second issue. The login page gave different error messages depending on what was wrong. An invalid user returned:
Your Email is not Registered - Please Register
This is user enumeration: the site tells an outsider which email addresses have accounts. That is useful to an attacker, because it separates the job of finding valid accounts from the job of guessing their passwords.
He judged it a lower-severity business logic issue and deliberately left it out of the original report, as a canary. A canary, in security, is a marker you plant and watch: if it changes, you learn something. Because the vendor was never told about this bug, it could show whether the eventual fix came from a broad security review or a narrow patch on the one endpoint that was reported.
To test it, he used a common convention. Large platforms use predictable aliases such as [redacted], and business portals often build administrative addresses from standard prefixes on their own domain. A localised alert on the page reading Cookies must be on to use [domain] helped him infer the structure. A cookie is a small piece of data a site stores in your browser so it can recognise you between page loads; the alert was simply telling visitors that cookies were required.
He tried [redacted]. The login module returned a different message:
Wrong Password
That confirmed the guessed account existed, which narrows an attacker's work down to password cracking or credential stuffing. Credential stuffing means trying username and password pairs leaked from other breaches, on the assumption that people reuse them.
After the patch, the reset leak was gone, but the login form still told an unregistered username apart from a valid account with a wrong password. In the researcher's view, the vendor fixed only the variables named in the report rather than auditing the whole identity and access management stack. Identity and access management is the part of a system that decides who you are and what you may do.
Variants to test
- Hidden credential fields in reset responses. Trigger a reset and search the response for fields such as
password_to_print,_tempor_hash. A positive result is a readable or reversible temporary credential you can log in with. - Client-side hashing of server-generated secrets. Look for scripts like
sha512.jsandformhash()handling passwords. A positive result is the raw secret appearing in the page or the request before hashing. - Differential login errors. Submit a non-existent user and then a real user with a wrong password. A positive result is two distinct messages, as with
Your Email is not Registered - Please RegisterversusWrong Password. - Predictable administrative aliases. Try standard prefixes such as
admin@,support@orinfo@on the target domain. A positive result is a different error for the guessed address, confirming the account exists.
Glossary
- Account takeover (ATO): gaining control of someone else's account, usually by obtaining their credentials.
- Anti-pattern: a common design choice that looks sensible but is known to be unsafe.
- Architecture: how the parts of an application are arranged and which part is trusted to do what.
- Bug bounty triage platform: a service that receives vulnerability reports on behalf of companies and first checks whether each report is real and in scope.
- Canary: a marker planted to detect later change; here, an unreported bug used to see whether a fix was broad or narrow.
- Client: the program on the user's side, normally the browser, as opposed to the server.
- Client-side hashing: scrambling a password inside the browser before sending it, instead of on the server.
- Cookie: a small piece of data a site stores in your browser so it can recognise you between page loads.
- Credential stuffing: trying username and password pairs leaked from other breaches, betting that people reuse them.
- CRM (customer relationship management): software for managing customers, leads and sales.
- DOM (Document Object Model): the browser's live, in-memory model of a page, which scripts can read and change.
- Endpoint: a specific address on a server that accepts requests, such as a form handler.
- Hash (SHA-512): a one-way scramble of data; the same input always gives the same output, but the output cannot be turned back into the input. SHA-512 is one particular hashing method.
- Hidden input: a form field that the visitor cannot see but that is still sent to the server.
- HTML: the language web pages are written in.
- Identity and access management (IAM): the part of a system that decides who you are and what you may do.
- Logic error: a program doing exactly what it was written to do, where the design itself is unsafe.
- Misconfiguration: a setting left wrong, such as a private folder being publicly readable.
- Out-of-band: sent through a separate channel, such as email, rather than in the direct response.
- Parameter: a named piece of data passed between browser and server.
- Plaintext: data in readable form, not encrypted or hashed.
- Proof of concept (PoC): a small, repeatable demonstration that a bug works.
- Proxy (Burp Suite): software that sits between browser and website and lets you read and edit every request and response.
- Remediation: the fix for a vulnerability.
- Response: what the server sends back after a request.
- Scoping: the early phase of a test where you map the target and decide what to look at.
- Script: a small program that runs inside a page, usually in the browser.
- Server: the computer that stores the site and answers requests.
- Temporary password: a short-lived password issued during a reset.
- User enumeration: a site revealing which usernames or email addresses have accounts.
view-source:: a browser prefix that shows the raw HTML a page was built from.- Vulnerability: a weakness that an attacker can use to make a system do something it should not.