Skip to content
RCE Advisory Intermediate CVE-2025-24049

Azure Command Line Integration (CLI) Elevation of Privilege Vulnerability (CVE-2025-24049)

Azure CLI did not properly neutralise special elements in a command, allowing command injection. An attacker who can pass a specially crafted key-value argument could inject arbitrary Python code and gain the rights of the user running the affected application.

Zhengyu Liu Follow

Originally disclosed on Microsoft

High 8.4 View original

Description

Improper neutralization of special elements used in a command ('command injection') in Azure Command Line Integration (CLI) allows an unauthorized attacker to elevate privileges locally.

FAQ

What privileges could be gained by an attacker who successfully exploited the vulnerability? The attacker would gain the rights of the user that is running the affected application.

FAQ

How could an attacker exploit this vulnerability? An attacker could exploit this vulnerability by passing a specially crafted key-value argument to Azure CLI, injecting arbitrary Python code that modifies runtime behavior.

Azure CLI

Azure CLI

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Zhengyu Liu and Jiacheng(Gavin) Zhong with Johns Hopkins University. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the CLI failed to neutralise special elements in a key-value argument, so the argument was interpreted as Python code rather than data.

Impact

An attacker could gain the rights of the user running the affected application, but only locally and only if they can supply the crafted argument.

What the attacker needed

Ability to pass a crafted argument to Azure CLI

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 report has not been written yet. The Original tab links to the source.

Azure CLI is a command-line tool for managing Azure cloud resources. This bug meant that a crafted argument given to the tool could be treated as code and run, so the attacker got the same permissions as the person running the tool. It is a local privilege escalation because the attacker needs to get their argument into the tool's input.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.