How I hacked one of the biggest airlines group of the world
The password reset endpoint accepted a request with a user ID in the path and no reset token, allowing an attacker to change any user's password. This enabled full account takeover across the airline group's unified login system.
Published on tarekbouali.com
About a year ago, when I started my first forays into HackerOne, I discovered one of the most impactful bugs I’ve ever come across. It was January 2021, when I received a private invitation to a VDP (Vulnerability Disclosure Program), it was from an airlines group.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the password reset API trusted a user-supplied user ID and did not require a valid reset token, allowing unauthorised password changes.
Impact
An attacker could change the password of any user across the airline group's sites, potentially accessing sensitive information such as saved credit cards for thousands or millions of users.
What the attacker needed
A free account; ability to capture and modify HTTP requests
How it was found
- Request a password reset for your own account and capture the change-password request.
- Notice the user ID in the request path and the reset token in the body.
- Create a second account to obtain another user ID.
- Modify the user ID in the path to the victim's ID and remove the resetToken field.
- Send the request and receive a 204 response, confirming the password change.
- Log in to the victim account with the new password.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A password reset link normally includes a secret token to prove you own the account. Here, the server did not check that token properly and also trusted a user ID in the URL. By removing the token and changing the ID, an attacker could set a new password for any account.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.