Frontend Fumbles The 250 Curious Case Of Api Key Permissions
A collaborator could create an API key with wildcard permissions that the frontend displayed as 'No access', and even after the admin changed permissions to read-only or none, the key retained full read/write access. An attacker with such a key could continue to access project configuration and projects despite apparent revocation.
Published on infosecwriteups.com
Today, we’re about to discuss one such twist — an issue that holds the power to disrupt the balance between security and access. In web development, every line of code, every interaction, and every component matters.
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 backend accepted wildcard permission strings but the frontend could not correctly display or update them, so permission changes made through the UI did not affect the actual key permissions.
Impact
An attacker with a collaborator account could create an API key that retains full read/write access even after an admin attempts to revoke permissions, potentially allowing continued unauthorised access to project configuration and projects.
What the attacker needed
A collaborator account; ability to create API keys; admin changes permissions via UI
How it was found
- Create an API key as a collaborator.
- In the request body, replace the permissions parameter values with a wildcard.
- Click 'Create API Key'.
- Remove the admin who created the API key.
- Change the API key permissions to read only or none.
- Try to access project_configuration or projects using the API key.
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.
An API key is like a password that lets a program access parts of a website. The website's user interface showed that the key had no permissions, but the backend still allowed full access. So even when an admin thought they had removed access, the key still worked, which could let someone keep using it secretly.
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.