Skip to content
OpenAdvisories
High · 8.1 CVE-2022-39327 BIT-azure-cli-2022-39327EUVD-2022-7010GHSA-47xc-9rr2-q7p4PYSEC-2022-43177

Improper Control of Generation of Code ('Code Injection') in Azure CLI

Published Oct 25, 2022 · Updated Apr 22, 2025 · Assigned by GitHub_M

Description

Azure CLI is the command-line interface for Microsoft Azure. In versions previous to 2.40.0, Azure CLI contains a vulnerability for potential code injection. Critical scenarios are where a hosting machine runs an Azure CLI command where parameter values have been provided by an external source. The vulnerability is only applicable when the Azure CLI command is run on a Windows machine and with any version of PowerShell and when the parameter value contains the `&` or `|` symbols. If any of these prerequisites are not met, this vulnerability is not applicable. Users should upgrade to version 2.40.0 or greater to receive a a mitigation for the vulnerability.

Affected products

VendorProductAffectedFixed
Azure azure-cli < 2.40.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS azure-cli No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI azure-cli < 2.40.0 2.40.0 GHSA-47xc-9rr2-q7p4

References