One Number, One Change: How I Took Over an Account Using Local St
The application stored a user identifier in browser local storage and trusted it without server-side validation. An attacker could change that number and refresh the page to log in as other users, taking over more than 100 accounts.
Published on medium.com
As we all know, the world of cybersecurity is full of ever-evolving threats. Today, I want to share an interesting vulnerability I discovered during a routine security audit of a web application.
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
The application trusted a client-side user identifier stored in local storage without server-side validation.
Impact
An attacker could take over any account by changing the identifier, and the author accessed over 100 accounts.
What the attacker needed
A valid account on the application; ability to edit browser local storage
The fix
The application should not store sensitive identifiers in local storage and must validate user identity on the server for every request.
How it was found
- Log into the application and open browser developer tools.
- Go to Application > Local Storage and find the key signupid with value 69.
- Edit the signupid value from 69 to 17.
- Refresh the page and observe being logged in as the user with Signup Id 17.
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.
Local storage is a small data store inside your browser that any user can edit. The app used a number from local storage to decide who you are, instead of checking with the server. By changing that number, the attacker could pretend to be other users.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.