The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-39327

CVE-2022-39327: Azure CLI RCE Vulnerability

CVE-2022-39327 is a remote code execution vulnerability in Microsoft Azure Command-line Interface that enables code injection on Windows systems. This article covers technical details, affected versions, and mitigation.

Published: February 18, 2026

CVE-2022-39327 Overview

CVE-2022-39327 is a critical command injection vulnerability affecting Microsoft Azure Command-Line Interface (Azure CLI) versions prior to 2.40.0. This vulnerability enables potential code injection when Azure CLI commands are executed on Windows machines using PowerShell, particularly in scenarios where parameter values are sourced from external inputs containing shell metacharacters (& or |).

Critical Impact

Attackers can inject and execute arbitrary commands on vulnerable Windows systems running Azure CLI when external input containing shell metacharacters is passed as command parameters.

Affected Products

  • Microsoft Azure Command-Line Interface versions prior to 2.40.0
  • Microsoft Windows (all versions when running vulnerable Azure CLI)
  • PowerShell (all versions in combination with vulnerable Azure CLI)

Discovery Timeline

  • 2022-10-25 - CVE-2022-39327 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-39327

Vulnerability Analysis

This vulnerability stems from improper handling of shell metacharacters in parameter values passed to Azure CLI commands. When Azure CLI runs on Windows systems with PowerShell, the application fails to adequately sanitize input containing the ampersand (&) or pipe (|) characters. These characters have special meaning in Windows command shells, where & allows command chaining and | enables piping output between commands.

The vulnerability is particularly dangerous in automation scenarios where Azure CLI commands process parameters from external sources such as user input, environment variables, or data from external APIs. An attacker who can influence these parameter values can inject malicious commands that execute with the privileges of the Azure CLI process.

The weakness falls under CWE-94 (Improper Control of Generation of Code - Code Injection) and CWE-78 (Improper Neutralization of Special Elements used in an OS Command - OS Command Injection).

Root Cause

The root cause is insufficient input validation and sanitization of command-line parameters before they are processed by the underlying Windows shell. Azure CLI failed to properly escape or reject shell metacharacters in user-controllable input, allowing the shell to interpret these characters as command delimiters rather than literal string content.

Attack Vector

The attack vector is network-based, requiring no authentication and no user interaction. An attacker can exploit this vulnerability remotely by providing malicious input to applications that incorporate user-controlled data into Azure CLI commands. The attack requires:

  1. The target system running Azure CLI on Windows
  2. Any version of PowerShell present on the system
  3. A parameter value containing & or | characters being processed

For example, if an application accepts a resource name from user input and passes it to an Azure CLI command, an attacker could supply a value like legitname & malicious-command to chain arbitrary command execution.

Detection Methods for CVE-2022-39327

Indicators of Compromise

  • Unexpected Azure CLI command executions with unusual parameter patterns containing & or | characters
  • PowerShell process spawning unexpected child processes after Azure CLI invocations
  • Anomalous command sequences in Windows Event logs showing command chaining patterns
  • Unusual network connections or file system modifications following Azure CLI operations

Detection Strategies

  • Monitor Windows Event logs for suspicious command-line patterns containing shell metacharacters in Azure CLI invocations
  • Implement application-level logging to capture Azure CLI command parameters before execution
  • Deploy endpoint detection rules to identify command injection patterns in PowerShell processes
  • Audit scripts and automation workflows that pass external input to Azure CLI commands

Monitoring Recommendations

  • Enable enhanced command-line process auditing in Windows Security policies
  • Configure SIEM alerts for Azure CLI processes spawning unexpected child processes
  • Review Azure CLI command history and correlate with application logs for anomalies
  • Implement input validation monitoring at the application layer before Azure CLI invocation

How to Mitigate CVE-2022-39327

Immediate Actions Required

  • Upgrade Azure CLI to version 2.40.0 or later immediately
  • Audit all automation scripts and applications that invoke Azure CLI with external input
  • Implement strict input validation to reject or escape & and | characters in parameter values
  • Review and restrict permissions for accounts running Azure CLI commands

Patch Information

Microsoft has addressed this vulnerability in Azure CLI version 2.40.0. The fix implements proper sanitization of shell metacharacters in command parameters. Details of the remediation can be found in GitHub Pull Request #23514 and GitHub Pull Request #24015. The complete security advisory is available at GitHub Security Advisory GHSA-47xc-9rr2-q7p4.

Workarounds

  • Implement application-level input validation to strip or escape & and | characters before passing to Azure CLI
  • Run Azure CLI in isolated environments with restricted network access and minimal privileges
  • Consider running Azure CLI in non-Windows environments (Linux/macOS) where this specific vulnerability does not apply
  • Use Azure SDK libraries directly instead of CLI commands when processing untrusted input
bash
# Verify Azure CLI version and upgrade if necessary
az --version

# Upgrade Azure CLI on Windows using MSI installer
# Download latest version from https://aka.ms/installazurecliwindows

# Or upgrade using pip if installed via pip
pip install --upgrade azure-cli

# Verify updated version is 2.40.0 or later
az --version | Select-String "azure-cli"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMicrosoft Azure

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability1.31%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94

  • CWE-78
  • Vendor Resources
  • GitHub Pull Request #23514

  • GitHub Pull Request #24015

  • GitHub Security Advisory GHSA-47xc-9rr2-q7p4
  • Related CVEs
  • CVE-2024-21646: Microsoft Azure Uamqp RCE Vulnerability

  • CVE-2026-26135: Azure Custom Locations SSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English