Escalating From Reader To Contributor In Azure API Management
A user with Reader-level access to an Azure API Management resource could read the keys of the default admin user via an ARM API endpoint, then use those keys to generate SharedAccessSignatures and authenticate to the Direct Management API. This allowed the user to perform management operations equivalent to Contributor-level access, including reading, modifying, and deleting configurations.
Published on binarysecurity.no
This blog post shows how a user with Reader-level access to an Azure API Management resource actually had the equivalent of Contributor-level access, allowing the user to read, modify and even delete configurations of the resource via the Direct Management API. This was possible because a regular user with read access…
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 an ARM API endpoint for reading APIM user keys was not covered by the API-version restrictions that were meant to prevent Reader users from accessing sensitive keys.
Impact
A Reader could escalate to Contributor-level access, potentially reading, modifying, or deleting APIM configurations and accessing secrets that could grant further access to Azure or Entra ID.
What the attacker needed
Reader-level access to an Azure APIM resource; A legitimate ARM bearer token
The fix
Microsoft fixed this by restricting the ARM API for users with Reader privileges, and the fix was applied retroactively to all APIM instances.
How it was found
- Read the keys of the admin user (userid = 1) using an ARM API request with a legitimate Bearer token.
- Generate a SharedAccessSignature using the retrieved key and the admin user ID.
- Call the APIM Direct Management API with the SharedAccessSignature in the Authorization header.
- Use the authenticated management API to list subscription keys, identity provider keys, and named value secrets.
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 cloud services, roles like 'Reader' are meant to only let you view things, not change them. Here, a Reader could secretly get hold of a special key that unlocked full control over the service, so they could change or delete settings as if they were an administrator.
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.