Password Reset Token Does Not Expire: An Insecure Configurability Issue
A password-reset token issued before an account's email address was changed remained usable afterwards, even though the account's security-related information had changed. An attacker holding an old reset token could potentially still set a new password on the account.
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
Password reset functionality is one of the most sensitive parts of an application. A reset link usually carries a temporary token that lets a user set a new password, and for security those tokens should normally have a limited lifetime and should become invalid after the relevant account state changes.
While testing an authorised application, the researcher came across a behaviour worth writing about: a previously generated password-reset token could still be used even after the account's email address had been changed. The write-up frames this as an Insecure Configurability issue.

The article's header image, credited to ChatGPT, introduces the topic: how password reset tokens should work and why tokens that never expire can create serious security risks in web applications.
Setup
The testing was done against an authorised application, using the researcher's own account. No specific product, version, endpoint, parameter or header is named in the write-up.
Finding it
When a user requests a password-reset link, the application generates a token and sends it to the registered email address. A secure flow may look like:
Request password resetTemporary token generatedToken sent to emailPassword resetToken becomes invalid
The interesting question is what happens to an unused password-reset token when the account's security-related information changes. If a previously generated token remains valid when it should have been invalidated, this can indicate an issue with password-reset token lifecycle management. The test is to observe whether the token issued before the email change is still accepted afterwards.
Exploitation
The behaviour can be tested using your own account on an authorised target.
Step 1: Create an account
Create a normal account on the target application.
Step 2: Request a password reset
Request a password-reset link. The application should send a reset link to the registered email address. Do not use the link yet.
Step 3: Log in normally
Instead of using the password-reset link, log in using your existing password.
Step 4: Change the account email
Change the account's email address to another email address that you control. At this point, the account's security-related information has changed.
Step 5: Test the previously generated token
Now return to the password-reset link that was sent to the original email address. Use the link with your own test account and observe whether the application still allows you to set a new password. If the old token remains usable when the application's intended security model requires it to be invalidated, this may represent a password-reset token invalidation issue.
Root cause
Password-reset tokens are effectively temporary credentials, and the application did not tie their validity to changes in account security state.
This is distinct from time-based expiration. A token might have a lifetime of 30 minutes, for example, but that does not necessarily mean it should remain valid throughout those 30 minutes regardless of what happens to the account. Security-sensitive events may require the application to invalidate previously issued tokens before their normal expiration time. The write-up does not state whether the token in this case had any time limit at all; the point is that state-based invalidation was missing.
Impact
If a token remains valid longer than intended, an attacker who obtains an old reset token may potentially use it later. The actual impact depends on several factors:
- How long the token remains valid
- Whether the token is single-use
- Whether changing account information invalidates existing tokens
- Whether the token can still reset the password
- Whether an attacker could realistically obtain the old token
The security impact should therefore be demonstrated rather than assumed.
Fix
The write-up does not describe a fix applied by the application. It sets out what a secure implementation should do: manage password-reset tokens carefully so that, depending on the application's design, tokens may need to be:
- Short-lived
- Single-use
- Invalidated after successful password reset
- Invalidated after relevant account-security changes
- Cryptographically unpredictable
- Properly associated with the intended account
The exact behaviour can vary between applications, but sensitive recovery tokens should never remain usable indefinitely.
- Email change, as described. Request a reset, log in with the existing password, change the email to a second address you control, then redeem the old link. A positive result is the application still letting you set a new password from the link sent to the original address.
- Password change. Request a reset, log in, change the account password, then redeem the old link. A positive result is the old link still resetting the password after the credential it was meant to recover has already been replaced.
- Second reset request. Request two reset links in sequence and redeem the older one after the newer one has been issued or used. A positive result is the older token still working, which points at missing single-use or supersession logic.
- Time beyond the stated lifetime. Where the application advertises a lifetime, wait past it and retry the link. A positive result is acceptance after expiry, which is the time-based counterpart of the state-based gap described here.
- Other security-relevant changes. Any account attribute the application treats as security-sensitive (for example, contact details or recovery settings) is a candidate: change it after issuing a token and check whether the token survives. A positive result is the token remaining redeemable when the application's own model says it should not be.
This type of testing should only be performed against your own accounts, authorised security-testing environments, or bug bounty programs that explicitly allow the test. Never attempt to use another person's password-reset token or access an account you do not own.
What happened, in plain words
Almost every website that lets you log in also has a "forgot password" button. When you click it, the site sends you an email containing a special link. That link is the only thing you need to set a new password, so it has to be treated like a key: whoever holds it can get into the account.
A security researcher was testing a website they had permission to test, using an account they had created themselves. They noticed something odd. They asked the site for a password reset link, but did not use it. Then they logged in normally with their old password and changed the email address on the account to a second address they also controlled. After that, they went back to the old reset link, the one that had been sent to the first email address, and checked whether the site would still let them set a new password with it.
That is the question the researcher set out to test: whether the link still works after the account's email address changes. The researcher calls this an Insecure Configurability issue, a problem in how the life of these links is managed.
Why does that matter? Imagine you move house and tell the bank your new address, but the bank keeps accepting letters sent to the old address as proof that you are you. Anyone who still has access to the old address, or who picked up an old letter, could act as you. A password reset link is the same kind of thing: it is a temporary proof of identity, and it should stop counting once the facts it was based on have changed.

The image at the top of the article, credited to ChatGPT, sets out the theme: how password reset tokens are supposed to work, and why a token that never expires can be a serious risk for a web application.
The basics you need first
Before walking through the test, here are the few ideas the rest of the article relies on. None of them require any technical background.
Account and login. An account on a website is a record the site keeps about you, usually identified by an email address and protected by a password. Logging in means proving to the site that you know the password for that account.
Password reset. Because people forget passwords, sites offer a recovery route. You tell the site which email address belongs to your account, and it emails you a link. Opening the link lets you choose a new password without knowing the old one. This is convenient, and it is also powerful: the link alone is enough to take over the account.
Token. A token is a long, random-looking string of characters that a site generates and hands to you, here inside the reset link. Think of a cloakroom ticket: the attendant gives you a numbered ticket, and whoever presents that ticket at the counter gets the coat. The ticket is not your name and it is not your password; it is a stand-in that the site agrees to accept. Because it stands in for your identity, it must be hard to guess and it must stop being accepted at the right moment.
Token lifetime and invalidation. Two separate ideas are often confused. Lifetime is about time: a token might be good for 30 minutes and then stop working. Invalidation is about events: a token might stop working earlier because something about the account changed, such as the password being reset or the email address being replaced. A good site does both. The second part, event-based invalidation, is what the test targets.
Single-use. A token is single-use if it stops working after it has been redeemed once. If it can be used again and again, a copy of the link is as good as the original, forever.
Security-related information. Anything about an account that the site uses to decide who you are or how you recover access: the email address, the password, recovery questions, backup contact details. Changing any of these should make older recovery material suspect, because the old material was issued for a different version of the account.
Authorised testing. Testing a website's security is only acceptable when the owner has agreed to it. That can mean your own account on a site that invites this kind of testing, a lab built for practice, or a bug bounty programme, which is a scheme where a company publicly invites researchers to look for problems and report them, sometimes for a reward. Using someone else's reset link, or touching an account you do not own, is not testing; it is an attack.
Setting up the test
The researcher tested an application they were authorised to test, using an account they had created. The write-up does not name the product, the version, the web address of the reset feature, the names of any fields, or any of the technical details a developer would use to find the code. That is deliberate: the lesson is general, and the specifics belong to the company.
The only things you need to reproduce the idea are:
- Permission to test the site.
- The ability to create a normal account on it.
- Two email addresses you control, so you can move the account from the first to the second.
That is all. No special software, no tools beyond a browser and your email inbox.
How a reset link is supposed to work
The article describes the intended flow in a short diagram:
Request password resetTemporary token generatedToken sent to emailPassword resetToken becomes invalid
Read it as a sequence of five moments:
- Request password reset. You click "forgot password" and give the site your email address. This is the starting gun.
- Temporary token generated. The site's server creates a random string, the token, and stores a record of it next to your account. The word temporary is doing real work here: the token is meant to exist for a short window only.
- Token sent to email. The site builds a link containing the token and emails it to the address on file. The token is the secret part; the rest of the link is just the site's address plus the token.
- Password reset. You open the link, the site checks the token, and if it is good you type a new password.
- Token becomes invalid. Once used, the token is retired. Anyone who later finds the old email, or a copy of the link in a browser history, gets nothing.
The diagram shows the happy path. The researcher's question is what happens off that path.
The question that found the bug
The article puts it simply: what happens to an unused reset token when the account's security-related information changes?
An unused token is one that was generated and emailed but never redeemed. It is sitting in an inbox, waiting. Meanwhile the account owner does something meaningful, like changing the email address. If the site is careful, that change should sweep away any outstanding reset links, because those links were issued for an account whose recovery address was different. If the site is careless, the old link stays live.
If a previously generated token remains valid when it should have been invalidated, that points to a problem in how the site manages the life of reset tokens. The test is whether the token issued before the email change is still accepted afterwards.
Step by step: reproducing it on your own account
The article lays out five steps. Each one is done with your own account on a site you are allowed to test. The write-up does not include the actual web requests or the server's replies, so there are no addresses, field names or response bodies to show; the steps are described in terms of what you do in the browser and in your inbox.
Step 1: Create an account
Create a normal account on the target application.
Why: you need an account you own, so that everything that follows happens to you and nobody else. A normal account is enough; there is no need for any special role or permission.
Step 2: Request a password reset
Request a password-reset link. The application should send a reset link to the registered email address. Do not use the link yet.
Why: this is the moment the site creates the token and emails it. You are deliberately leaving it unused, because an unused token is the thing under test. If you clicked it now, it would be spent, and the question would change.
What to do with the email: keep it. Do not delete it, and do not open the link. You will come back to it in step 5.
Step 3: Log in normally
Instead of using the password-reset link, log in using your existing password.
Why: you need to be inside the account to change its email address, and you want to get there without touching the reset link. Logging in with the password you already know proves that the account is still fully usable the ordinary way, and it keeps the reset token untouched for later.
Step 4: Change the account email
Change the account's email address to another email address that you control. At this point, the account's security-related information has changed.
Why: this is the event the whole test revolves around. The email address is the address the site uses to send recovery links, so replacing it is exactly the kind of change that should make old recovery material stale. You use a second address you control so that you can still receive mail for the account and so that no third party is involved.
Step 5: Test the previously generated token
Now return to the password-reset link that was sent to the original email address. Use the link with your own test account and observe whether the application still allows you to set a new password. If the old token remains usable when the application's intended security model requires it to be invalidated, this may represent a password-reset token invalidation issue.
Why: this is the moment of truth. The link was created when the account had the first email address. The account now has a different one. If the site is careful, opening the link should produce an error, an "invalid or expired link" message, or a redirect to request a new one. If the site is careless, the page will happily let you type a new password, and that is the bug.
What to record: whether the link was accepted, what the page said, and whether the password actually changed. The article stresses that the impact should be demonstrated rather than assumed, so the observation matters more than the theory.
Why this is a real problem, not a curiosity
The article explains the reasoning with a comparison that is worth spelling out. A reset token is effectively a temporary credential. A credential is anything a site accepts as proof that you are you: a password is a long-term credential, a reset token is a short-term one. If a short-term credential outlives the situation it was issued for, it becomes a loose key.
Picture a hotel. You check out, hand back the key card, and the hotel reissues the room to someone else. If the old card still opens the door, the checkout meant nothing. Changing your account email is like checking out: the site should assume the old key is no longer in the right hands.
Who could actually be harmed? Consider a person who changes their email address because the old one was compromised, or because they no longer have access to it, or because they are moving away from a shared or work address. A reset link sent to that old address may still be sitting in an inbox they no longer control. If the link still works after the change, the person who can read that inbox can still take over the account, even though the owner thought they had closed that door.
The article is careful not to overstate this. Whether the issue is serious depends on several factors:
- How long the token remains valid
- Whether the token is single-use
- Whether changing account information invalidates existing tokens
- Whether the token can still reset the password
- Whether an attacker could realistically obtain the old token
Each of those is a question you answer by testing, not by guessing. A token that expires in ten minutes and can only be used once is a much smaller problem than a token that lives for weeks and can be replayed. And a token nobody else can obtain is not much of a risk at all. That is why the article says the security impact should be demonstrated rather than assumed.
What a careful site should do
The article does not describe a fix that the company applied. It sets out what a secure implementation should do, so that you can judge what you are looking at. Depending on how the application is designed, reset tokens may need to be:
- Short-lived. The token should stop working after a short window, so a leaked link has a small useful life.
- Single-use. Once redeemed, the token should be retired, so a copy of the link is worthless.
- Invalidated after a successful password reset. If the password has just been changed, any other outstanding reset links for that account should die.
- Invalidated after relevant account-security changes. Changing the email address, or anything else the site treats as security-sensitive, should sweep away tokens issued before the change.
- Cryptographically unpredictable. The token should be generated with a proper random source, so that nobody can guess the next one. A token made from a counter or the current time is guessable.
- Properly associated with the intended account. A token should only ever work for the account it was issued for, never for a different one.
The exact behaviour can vary between applications, but sensitive recovery tokens should never remain usable indefinitely.
Time limits and event limits are not the same thing
The article spends a paragraph on a distinction that trips people up, and it is worth repeating in plain terms.
There is an important difference between time-based expiration and state-based invalidation. A token might have a lifetime of 30 minutes, for example, but that does not necessarily mean it should remain valid throughout those 30 minutes regardless of what happens to the account. Security-sensitive events may require the application to invalidate previously issued tokens before their normal expiration time.
A comparison: a shop might say a refund voucher is valid for 30 days. That does not mean the voucher should still be honoured after you have already used it, or after the shop has closed your account. The time limit is one rule; the events are another. A site that only checks the clock and never checks what happened to the account has a gap, and that gap is what this test looks for.
The write-up does not say whether the token in this case had any time limit at all.
Once you understand the idea, the same test can be pointed at other events. The article lists several variants. All of them are done on your own account, on a site you are allowed to test.
- Email change, as described. Request a reset, log in with the existing password, change the email to a second address you control, then redeem the old link. A positive result is the application still letting you set a new password from the link sent to the original address.
- Password change. Request a reset, log in, change the account password, then redeem the old link. A positive result is the old link still resetting the password after the credential it was meant to recover has already been replaced.
- Second reset request. Request two reset links in sequence and redeem the older one after the newer one has been issued or used. A positive result is the older token still working, which points at missing single-use or supersession logic. Supersession simply means a newer token should replace an older one, the way a new door key makes the old copy obsolete.
- Time beyond the stated lifetime. Where the application advertises a lifetime, wait past it and retry the link. A positive result is acceptance after expiry, which is the time-based counterpart of the state-based gap described here.
- Other security-relevant changes. Any account attribute the application treats as security-sensitive, for example contact details or recovery settings, is a candidate: change it after issuing a token and check whether the token survives. A positive result is the token remaining redeemable when the application's own model says it should not be.
For each variant, the discipline is the same: change one thing, then test the old link, and write down exactly what happened.
Testing responsibly
This type of testing should only be performed against:
- Your own accounts
- Authorised security-testing environments
- Bug bounty programs that explicitly allow the test
Never attempt to use another person's password-reset token or access an account you do not own.
The reason is not just legal, though it is that too. A reset link is a key to someone's account. Trying a link that was not issued to you is the same as trying a stranger's front door key in their lock, whether or not it turns. If you want to practise, create your own accounts on sites that invite testing, or use a lab environment built for the purpose.
Final thoughts
Password-reset functionality is often overlooked during security testing, but it is an important part of an application's authentication system. Authentication is the whole business of proving who someone is, and the reset flow is the part of it that hands out access without a password. That makes it worth a look.
A simple question such as:
"Is an old password-reset token still valid after an important account change?"
can reveal weaknesses in token lifecycle management. You do not need tools or code to ask it. You need an account, two email addresses, and the patience to leave a link unopened while you change something about the account.
The key is not just finding that a token works. A good security assessment should determine why it remains valid, what security boundary it affects, and what realistic impact it creates. In other words: explain the mechanism, say who could be harmed and how, and be honest about what you did not test.
Always test responsibly, document the behaviour clearly, and report the issue through the appropriate security channel. The appropriate channel is whatever route the site owner has published for security reports, such as a bug bounty programme or a security contact address.
Glossary
- Account: the record a website keeps about you, usually identified by an email address and protected by a password.
- Authentication: the process of proving to a site who you are, normally by logging in.
- Authorised testing: security testing done with the permission of the site owner, on your own accounts, in a lab, or through a bug bounty programme.
- Bug bounty programme: a scheme where a company publicly invites researchers to find and report security problems, sometimes in exchange for a reward.
- Credential: anything a site accepts as proof of identity, such as a password or a reset token.
- Cryptographically unpredictable: generated in a way that cannot be guessed or predicted, using a proper random source.
- Email address change: replacing the address on file for an account, which changes how the site reaches the owner for recovery.
- Insecure Configurability: the article's label for a problem in how a security feature is set up and managed over time, here the lifecycle of reset tokens, rather than in the format of the token itself.
- Invalidation: making a token stop being accepted, usually because of an event such as a password reset or an email change.
- Lifetime: the period during which a token is meant to be accepted, measured in time.
- Password reset: the feature that lets a user set a new password without knowing the old one, usually via an emailed link.
- Reset link: the URL emailed to a user that contains a reset token and opens the page for choosing a new password.
- Security-related information: account details the site relies on to identify the owner or recover access, such as the email address, password or recovery settings.
- Single-use: a property of a token that stops working once it has been redeemed.
- State-based invalidation: retiring a token because something about the account changed, as opposed to because time passed.
- Supersession: the rule that a newly issued token replaces an older one, so the older one stops working.
- Time-based expiration: retiring a token because its allowed lifetime has run out.
- Token: a long, random string a site generates and hands to a user as a temporary stand-in for identity, here inside a reset link.
- Token lifecycle management: how a site creates, stores, checks, expires and retires tokens over their whole existence.
- Unused token: a token that was generated and delivered but never redeemed.