# CVE-2022-39327: Improper Control of Generation of Code ('Code Injection') in Azure CLI

- Severity: High 8.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.24%, higher than 91% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-10-25T00:00:00.000Z
- Modified: 2026-09-08T08:45:39.452Z
- Also known as: GHSA-47xc-9rr2-q7p4, BIT-AZURE-CLI-2022-39327, PYSEC-2022-43177
- Weaknesses: CWE-78, CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- 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.

(As written by CVE List.)

## Affected

- Azure azure-cli: < 2.40.0
- azure-cli (PyPI): before 2.40.0
- microsoft azure_command-line_interface: before 2.40.0
- azure-cli (Bitnami): before 2.40.0

## Every score

- GitHub_M: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/Azure/azure-cli/security/advisories/GHSA-47xc-9rr2-q7p4> (exploit, advisory, evidence, mitigation, third-party-advisory, web)
- <https://github.com/Azure/azure-cli/pull/23514> (exploit, advisory, evidence, fix, patch, third-party-advisory, web)
- <https://github.com/Azure/azure-cli/pull/24015> (advisory, fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-39327> (advisory, web)
- <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)

## Sources

- CVE List: [CVE-2022-39327](https://www.cve.org/CVERecord?id=CVE-2022-39327), CVE Terms of Use, modified 2025-04-22
- GitHub Advisory Database: [GHSA-47xc-9rr2-q7p4](https://github.com/advisories/GHSA-47xc-9rr2-q7p4), CC-BY-4.0, modified 2026-06-10
- NVD: [CVE-2022-39327](https://nvd.nist.gov/vuln/detail/CVE-2022-39327), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-43177](https://osv.dev/vulnerability/PYSEC-2022-43177), CC-BY-4.0, modified 2026-06-10
- Bitnami Vulnerability Database: [BIT-AZURE-CLI-2022-39327](https://osv.dev/vulnerability/BIT-AZURE-CLI-2022-39327), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-39327 · Whole record: https://cve.day/CVE-2022-39327.json · Rebuilt by cve.day 2026-11-25T22:58:15.995Z
