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

Exp

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: 2022-10-25 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-39327 is rated High Exploit Risk (79.5/100): CVSS High severity, with medium exploitation likelihood (EPSS 3.21%). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). EPSS rose +1.83% over the last day, indicating growing attacker interest. Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2022-39327

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2022-39327

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 1.38% 3.21% +1.83%
2 2026-04-20 1.31% 1.38% +0.07%
3 2025-11-21 1.31%

Full EPSS history (20 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-39327

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.1 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.2 5.9 [email protected]
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]

Weakness enumeration for CVE-2022-39327

GitHub Security Advisory for CVE-2022-39327

GHSA-47xc-9rr2-q7p4 · Severity: high · Ecosystem: pip — Improper Control of Generation of Code ('Code Injection') in Azure CLI

OS Trackers for CVE-2022-39327

vendor priority summary link
debian unimportant CVE-2022-39327 unimportant priority: Debian including 1 source packages (azure-cli), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2022-39327
suse high CVE-2022-39327 severity important: SUSE including 1 source package names (azure-cli), 6 product×package rows across 6 product lines (SUSE Linux Enterprise Module for Public Cloud 12, SUSE Linux Enterprise Module for Public Cloud 15, … (6 product lines)): Known Not Affected 6. https://www.suse.com/security/cve/CVE-2022-39327/
ubuntu medium CVE-2022-39327 medium priority: Ubuntu including 1 source packages (azure-cli), 13 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 9, ignored 2, needs-triage 2. https://ubuntu.com/security/CVE-2022-39327

Affected software / configurations for CVE-2022-39327

Vendor Product Version Raw CPE
microsoft azure_command-line_interface < 2.40.0 cpe:2.3:a:microsoft:azure_command-line_interface:*:*:*:*:*:*:*:*

References for CVE-2022-39327

URL Tags
https://github.com/Azure/azure-cli/pull/23514 Exploit Patch Third Party Advisory
https://github.com/Azure/azure-cli/pull/24015 Patch Third Party Advisory
https://github.com/Azure/azure-cli/security/advisories/GHSA-47xc-9rr2-q7p4 Exploit Mitigation Third Party Advisory
cvelogic Threat Intelligence