{"answers":{"affected":"4 open source packages ship an affected version, including azure-cli. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-39327 exists.","fix":"Upgrade azure-cli to 2.40.0 or later.","what":"CVE-2022-39327 is a high-severity code injection vulnerability in azure-cli, published on 25 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-39327 and fix it if it is affected.\n\nWhat it is: CVE-2022-39327 is a high-severity code injection vulnerability in azure-cli, published on 25 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-39327 exists.\n\nAffected packages and fixed versions:\n- azure-cli (Bitnami): affected all versions; fixed in 2.40.0\n- azure-cli (PyPI): affected all versions; fixed in 2.40.0\n- azure-cli (PyPI): affected all versions; fixed in 2.40.0\n- azure-cli (PyPI): affected all versions; fixed in 2.40.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-39327/ (Markdown: https://insights.sbomify.com/CVE-2022-39327/index.md)","id":"CVE-2022-39327","markdown":"https://insights.sbomify.com/CVE-2022-39327/index.md","name":"CVE-2022-39327","record":{"aliases":["BIT-azure-cli-2022-39327","GHSA-47xc-9rr2-q7p4","PYSEC-2022-43177","UBUNTU-CVE-2022-39327"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Azure CLI","requires_auth":"none","summary":"Attackers can execute arbitrary code on Windows machines via Azure CLI if external input contains specific symbols, requiring an upgrade to mitigate.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"azure_command-line_interface","vendor":"microsoft"}],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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 `\u0026` 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.","ecosystems":["Bitnami","PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Improper Control of Generation of Code ('Code Injection') in Azure CLI","id":"CVE-2022-39327","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"code_injection","year":"2022"},"n_packages":4,"n_references":3,"next":{"headline":"Grafana vulnerable to race condition allowing privilege escalation","id":"CVE-2022-39328"},"packages":[{"ecosystem":"Bitnami","fixed":["2.40.0"],"introduced":["0"],"last_affected":[],"package":"azure-cli","purl":"pkg:bitnami/azure-cli","source":"BIT-azure-cli-2022-39327"},{"ecosystem":"PyPI","fixed":["2.40.0"],"introduced":["0"],"last_affected":[],"package":"azure-cli","purl":null,"source":"GHSA-47xc-9rr2-q7p4"},{"ecosystem":"PyPI","fixed":["2.40.0"],"introduced":["0"],"last_affected":[],"package":"azure-cli","purl":"pkg:pypi/azure-cli","source":"GHSA-47xc-9rr2-q7p4"},{"ecosystem":"PyPI","fixed":["2.40.0"],"introduced":["0"],"last_affected":[],"package":"azure-cli","purl":"pkg:pypi/azure-cli","source":"PYSEC-2022-43177"}],"prev":{"headline":"kartverket/github-workflows's run-terraform allows for RCE via terraform plan","id":"CVE-2022-39326"},"products":["azure-cli"],"published":"2022-10-25","related":[{"cvss_score":8.7,"headline":"Azure Command Line Integration (CLI) Elevation of Privilege Vulnerability","id":"CVE-2024-43591","kev_date_added":null,"published":"2024-10-08"},{"cvss_score":8.6,"headline":"Azure CLI REST Command Information Disclosure Vulnerability","id":"CVE-2023-36052","kev_date_added":null,"published":"2023-11-14"},{"cvss_score":8.4,"headline":"Azure Command Line Integration (CLI) Elevation of Privilege Vulnerability","id":"CVE-2025-24049","kev_date_added":null,"published":"2025-03-11"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["Azure"]},"summary":"Attackers can execute arbitrary code on Windows machines via Azure CLI if external input contains specific symbols, requiring an upgrade to mitigate.","url":"https://insights.sbomify.com/CVE-2022-39327/"}