Broken Authentication Vulnerability That Allowed Unauthorized Users to Like Private Posts
The like endpoint accepted a post ID without checking whether the requesting user was allowed to interact with that private post. An attacker who knew another user's private post ID could like it without being able to view it.
Published on medium.com
I am Ankit Rathva and i am a student of MCA 2nd year, I am an ethical hacker and security researcher with a passion for finding logic, authorization, and data-integrity flaws in web applications. As a bug bounty hunter and red teamer, he combines hands-on testing, forensic analysis, and careful disclosure to help…
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 like action trusted the post ID supplied by the client and did not check that the authenticated user owned or could access that private post.
Impact
An unauthorised user could like another user's private post, making engagement counts unreliable, but the contents of the private post were not exposed and exploitation required knowing a long, hard-to-guess identifier.
What the attacker needed
A free account; a second account as attacker; knowledge of a victim's private post ID; ability to intercept requests
The fix
The server should check on every like request that the authenticated user is authorised to access the target post before recording the action.
How it was found
- Register and log in to the application.
- Create a new board.
- Create a suggestion and mark it as private.
- Create a second account to act as the attacker.
- Intercept the like request on your own private suggestion.
- Replace the post ID with another user's private post ID and forward the request.
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 private post is meant to be seen and used only by its owner. The server checked that you were logged in, but not that the post belonged to you, so anyone who knew the post's identifier could still press like on it. This is a missing permission check, often called broken access control.
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.