When APIs Don’t Check Roles: Broken Authorization in Customer D
A low-privileged user could access and delete customer contacts via an API endpoint because the server did not check the user's role. The attacker could delete all contacts in the organisation, causing data loss.
I don’t know what’s meant to be in an intro. No to formalities, haha.
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 API endpoint did not verify the user's role before allowing the delete action.
Impact
Any low-level user could delete all organisational contacts, causing significant data loss for admins.
What the attacker needed
A low-privileged account; a valid JWT token from the UI
How it was found
- As a normal user, navigate to the redacted section and fill in the required data.
- View a specific redacted item and click the 'Email Redacted' button.
- This triggers an OPTIONS request and then a GET request that includes a valid Authorization Bearer token.
- Copy the token and use it in a DELETE request to the contact endpoint, changing the contact ID to any ID in your organisation.
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.
In many apps, users have different roles, like admin or normal user. The app should check your role before letting you do sensitive things. Here, the API forgot to check, so a normal user could delete all contacts.
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.