CVE-2022-39327
CRITICAL 9.8CVSS 3.1Improper Control of Generation of Code ('Code Injection') in Azure CLI
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.
- Published
- 25 Oct 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-78CWE-94
- Also known as
- BIT-azure-cli-2022-39327GHSA-47xc-9rr2-q7p4PYSEC-2022-43177
- Sources
- NVDJSONOSV GHSA-47xc-9rr2-q7p4JSONOSV PYSEC-2022-43177JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | microsoft | azure_command-line_interfacecpe:2.3:a:microsoft:azure_command-line_interface:*:*:*:*:*:*:*:* |
< 2.40.0 | 2.40.0 |
| OSV | PyPI | azure-cli | < 2.40.0 | 2.40.0 |
References
- https://github.com/Azure/azure-cli/pull/23514 · Exploit, Patch, Third Party Advisory, WEB, EVIDENCE, FIX
- https://github.com/Azure/azure-cli/pull/24015 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/Azure/azure-cli/security/advisories/GHSA-47xc-9rr2-q7p4 · Exploit, Mitigation, Third Party Advisory, WEB, ADVISORY, EVIDENCE
- https://nvd.nist.gov/vuln/detail/CVE-2022-39327 · ADVISORY
- https://github.com/Azure/azure-cli · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/azure-cli/PYSEC-2022-43177.yaml · WEB
- https://github.com/advisories/GHSA-47xc-9rr2-q7p4 · ADVISORY
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 25 Oct 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 25 Oct 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 25 Oct 2022)