Skip to content
Access control Write-up Advanced

CVE-2021-27075: Microsoft Azure Vulnerability Allows Privilege Escalation and Leak of Private Data

The Azure Wire Server's Certificates endpoint accepted an attacker-supplied transport certificate, so an unprivileged user could obtain and decrypt any VM extension's protected settings. Combined with the VMAccess extension storing admin passwords, this allowed privilege escalation and possible lateral movement.

Intezer Follow

Published on intezer.com

In this post I will explain how the Microsoft Azure Virtual Machine (VM) extension works and how we found a fatal vulnerability in the extension mechanism affecting Azure VM Linux systems. As part of the responsible disclosure policy, we reported the vulnerability to Microsoft Security Response Center (MSRC).

Intezer, on intezer.com

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 Certificates endpoint failed to validate the caller's transport certificate, and a firewall rule blocking non-root access to the Wire Server could be bypassed via an alternate address.

Impact

An unprivileged user could leak any extension's private data and, via VMAccess, escalate privileges and possibly move laterally; the root-only firewall rule limited direct access but was bypassed, and Docker containers were not covered by it at all.

What the attacker needed

Code execution as an unprivileged user on the VM; VMAccess extension used for escalation

The fix

Microsoft fixed the issue by revamping the whole Linux extension mechanism, and the firewall gap was also fixed.

How it was found

  1. Create an attacker-controlled transport private key and certificate.
  2. Send the attacker certificate to the Certificates endpoint to receive the encrypted extension keys.
  3. Decrypt the returned keys with the attacker transport key.
  4. Use the decrypted key to decrypt the extension's protectedSettings.
  5. Bypass the root-only firewall rule by using the alternate address for the Wire Server.
  6. Leak the VMAccess admin password from protectedSettings to escalate privileges.

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.

Azure virtual machines run small add-on programs called extensions, and their secret settings are encrypted with keys fetched from a Microsoft service on the machine. The service did not check who was asking, so any logged-in user could supply their own key, receive the real keys, and read those secrets. One extension keeps admin passwords, so reading them let a low-privileged user become 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.

More by Intezer

View all

2 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.