Azure API vulnerability and roles misconfiguration compromise corporate networks
Several Azure built-in roles that appear service-specific actually grant read access to all resources, and one Azure API call that returns a VPN pre-shared key was implemented with GET, so a read-only identity could fetch it. An attacker with a weak identity could therefore obtain the VPN key and connect to site-to-site VPNs, reaching internal cloud and on-premises networks.
token.security
Published on token.security
{{media:2}}{{media:3}}{{media:4}}{{media:5}}
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, several built-in role definitions include a wildcard read permission that grants far more than their names suggest, and one API that returns a VPN shared key was implemented with GET, which Azure treats as allowed for read-only identities.
Impact
An attacker with a low-privileged identity could read sensitive configuration and secrets and, where the VPN gateway allows it, connect to internal cloud and on-premises networks; the text notes the connection may only work from the IP address configured in the gateway.
What the attacker needed
A low-privileged Azure identity; one of the over-privileged roles assigned; a site-to-site VPN gateway; source IP may need to match gateway config
The fix
Microsoft fixed the VPN key leak by requiring a specific permission to fetch the key, but declined to fix the over-privileged roles and only updated their documentation, so customers should avoid those roles, use narrow scopes and build custom roles.
How it was found
- Compromise a weak identity that has read permissions or one of the over-privileged roles.
- Use that identity to fetch the VPN Gateway pre-shared key.
- Connect to the site-to-site VPN using the key and reach internal networks.
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 Azure, roles decide what a user is allowed to do. Some roles that sound narrow actually let the user read everything in the subscription, including scripts and settings that often hold passwords. Separately, one Azure request that returns a VPN password could be made by anyone with read access, so a low-privileged user could get the key and join the private network.
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.