Waiting for admin approve , I don’t think so !
The comment system's frontend trusted an 'abilities' object returned by an internal API to decide whether a user could approve, edit or delete comments. By intercepting the response and flipping those flags to true, the researcher could approve their own pending comment and manage other users' comments.
medium.com
Published on medium.com
Well, I found a way to skip that part entirely. In fact, I could approve my own comments instantly — and even approve (or delete or edit) comments made by others.
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
Impact
An attacker could approve their own pending comments and edit, delete or approve comments belonging to other users, though the team rated it low because comments are not a main function of the program.
What the attacker needed
Ability to intercept HTTP responses; a comment ID (from a permanent link)
The fix
The issue was fixed by the team after responsible disclosure.
How it was found
- Find the internal comments API endpoint in the site's JavaScript bundles.
- Obtain a comment ID from the permanent link next to a comment.
- Request the comment details endpoint and observe the abilities object with all flags false.
- Intercept the response and change the abilities flags to true.
- Observe that the comment is approved and edit/delete options become available.
- Use another comment ID to edit, delete or approve other users' comments.
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 post a comment, the website asks its server 'what am I allowed to do with this comment?' and the server replies with a list of permissions. The site then shows buttons like Edit or Delete based on that reply. Here, the server never checked those permissions again when the action was actually performed, so changing the reply in the browser let the researcher do things they should not have been allowed to do.
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.