Escalating from Logic App Contributor to Root Owner in Azure
An Azure Resource Manager API Connection with Contributor access allowed creating role assignments as the connected user, but a path traversal payload in the resource group name escaped the intended resource group scope to the subscription or root level. An attacker with Contributor access could thus grant themselves Owner rights at higher scopes.
Published on netspi.com
Technical / Cloud Pentesting
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 server resolved a path traversal sequence in the resource group name after validating it against the Swagger API definition, so the request reached an unintended scope.
Impact
An attacker with Contributor access to an API Connection could escalate to Owner at the subscription or root level, but only if the connected user had sufficient rights (such as User Access Administrator at the root).
What the attacker needed
Contributor access to an ARM API Connection; API Connection authenticated as a privileged user
The fix
Microsoft remediated the issue by filtering the method value to block paths that include the path traversal payload.
How it was found
- Create or use an Azure Resource Manager API Connection authenticated as a user with User Access Administrator rights at the Root level.
- Use the API Connection to create a role assignment at the resource group level to confirm the basic capability.
- Set the resource group name to a path traversal value so the request path resolves to the subscription level.
- Create a role assignment at the subscription level, granting Owner rights.
- Extend the traversal to the root level to create a role assignment there.
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 systems like Azure, permissions are often scoped to a resource group (a folder for related resources) or a subscription (a larger container). A user with 'Contributor' access can manage resources but should not be able to grant themselves more permissions outside their assigned scope. Here, a flaw let a Contributor trick the system into creating a permission grant at a higher level, effectively giving themselves full control.
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.