Privilege Escalation: Member Role Can Change Organization Name and Photo
A Member-role user, who should only be able to view the organization, could change the organization's name and photo by sending the same request with a different HTTP method. The server checked permissions for the expected method but not for the alternative one, so a low-privileged user could modify organization settings.
Published on medium.com
One day, my friend Ahmed Ghazy and I were looking for a program to test. We found one that uses role-based permissions — and yes, we love roles!
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 authorisation check was tied to the PATCH method only, so the same endpoint accepted a PUT request from a Member without verifying permissions.
Impact
A Member could change the organization's name and photo despite lacking permission, which could mislead other users or damage the organization's identity.
What the attacker needed
A Member-role account; an Owner or Admin request to copy
How it was found
- Log in as Owner, change the organization name and capture the request.
- Replace the Owner cookie with the Member account's cookie and resend; the change is rejected.
- Change the request method from PATCH to PUT and resend with the Member cookie.
- Trigger an error on the endpoint to learn the expected fields, then add the name key.
- Find the logo_media_id key, upload a photo via another endpoint to get its ID, and add it to the request.
- Send the request and confirm both the name and photo were changed.
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 website often gives different users different powers, called roles. Here a low-level 'Member' should only be able to look at the organization, not change it. The server checked the permission only for one kind of request (PATCH) but forgot to check it for another kind (PUT), so a Member could still make the change.
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.