Exploiting Session Hijacking Vulnerability: My Bug Bounty Experie
The website's session management did not bind session cookies to the authenticated user, so replacing one user's cookies with another's granted access to the other user's profile. An attacker who obtained a victim's cookies could impersonate them and access sensitive data.
Published on medium.com
During my recent bug bounty exploration, I uncovered a critical vulnerability in a website’s session management system that allowed unauthorized access to user accounts through cookie manipulation. In this story, I’ll walk you through the discovery process, the exploitation steps, and the lessons learned from this…
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 server trusted the session cookie without verifying that it matched the authenticated user, and access control relied only on the cookie value.
Impact
An attacker who obtains a victim's cookies could impersonate them, access sensitive data, and perform actions on their behalf, potentially leading to account takeover.
What the attacker needed
Ability to capture victim's cookies; two accounts
The fix
The site should validate session cookies against the authenticated user and enforce access controls on every request.
How it was found
- Log into Account 1 and capture its cookies using Burp Suite.
- Log into Account 2 in a separate private tab and capture its cookies.
- While logged into Account 2, try to access Account 1's profile URL and observe the 'Access Restricted' message.
- Replace Account 2's cookies with those captured from Account 1.
- Reload Account 1's profile URL and observe successful access.
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.
When you log in, a website gives your browser a cookie (a small piece of data) to remember who you are. This report shows that the site did not check that the cookie actually belonged to the logged-in user, so swapping in someone else's cookie let the tester view that person's account. It is like using someone else's key card and the door opening without checking your photo.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.