{"answers":{"affected":"5 open source packages ship an affected version, including composer/composer and composer. It affects 2 products.","exploited":"There is no known exploitation of CVE-2021-41116 in the wild and no public exploit code.","fix":"Upgrade composer/composer to a fixed version for your release line: 1.10.23 or 2.1.9.","what":"CVE-2021-41116 is a high-severity command injection vulnerability in composer, published on 5 Oct 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-41116 and fix it if it is affected.\n\nWhat it is: CVE-2021-41116 is a high-severity command injection vulnerability in composer, published on 5 Oct 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-41116 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- composer/composer (Packagist): affected all versions; fixed in 1.10.23\n- composer/composer (Packagist): affected all versions; fixed in 1.10.23\n- composer/composer (Packagist): affected from 2.0.0-alpha1; fixed in 2.1.9\n- composer/composer (Packagist): affected from 2.0.0-alpha1; fixed in 2.1.9\n- composer (Bitnami): affected all versions; fixed in 1.10.23, 2.1.9\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-2021-41116/ (Markdown: https://insights.sbomify.com/CVE-2021-41116/index.md)","id":"CVE-2021-41116","markdown":"https://insights.sbomify.com/CVE-2021-41116/index.md","name":"CVE-2021-41116","record":{"aliases":["BIT-composer-2021-41116","CLEANSTART-2024-SA12234","GHSA-frqg-7g38-6gcf","UBUNTU-CVE-2021-41116","openSUSE-SU-2024:11617-1","openSUSE-SU-2024:11874-1"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP dependency manager","requires_auth":"none","summary":"Windows users installing untrusted dependencies via Composer are vulnerable to command injection, allowing attackers to execute arbitrary code.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"composer","vendor":"getcomposer"},{"product":"tenable.sc","vendor":"tenable"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"Composer is an open source dependency manager for the PHP language. In affected versions windows users running Composer to install untrusted dependencies are subject to command injection and should upgrade their composer version. Other OSs and WSL are not affected. The issue has been resolved in composer versions 1.10.23 and 2.1.9. There are no workarounds for this issue.","ecosystems":["Bitnami","Packagist","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Command injection in composer on Windows","id":"CVE-2021-41116","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"command_injection","year":"2021"},"n_packages":7,"n_references":3,"next":{"headline":"Insecure random number generation","id":"CVE-2021-41117"},"packages":[{"ecosystem":"Bitnami","fixed":["1.10.23","2.1.9"],"introduced":["0","2.0.0"],"last_affected":[],"package":"composer","purl":"pkg:bitnami/composer","source":"BIT-composer-2021-41116"},{"ecosystem":"Packagist","fixed":["1.10.23"],"introduced":["0"],"last_affected":[],"package":"composer/composer","purl":null,"source":"GHSA-frqg-7g38-6gcf"},{"ecosystem":"Packagist","fixed":["1.10.23"],"introduced":["0"],"last_affected":[],"package":"composer/composer","purl":"pkg:composer/composer/composer","source":"GHSA-frqg-7g38-6gcf"},{"ecosystem":"Packagist","fixed":["2.1.9"],"introduced":["2.0.0-alpha1"],"last_affected":[],"package":"composer/composer","purl":null,"source":"GHSA-frqg-7g38-6gcf"},{"ecosystem":"Packagist","fixed":["2.1.9"],"introduced":["2.0.0-alpha1"],"last_affected":[],"package":"composer/composer","purl":"pkg:composer/composer/composer","source":"GHSA-frqg-7g38-6gcf"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.10.25-1.1"],"introduced":["0"],"last_affected":[],"package":"php-composer","purl":"pkg:rpm/opensuse/php-composer\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:11874-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2.1.12-1.1"],"introduced":["0"],"last_affected":[],"package":"php-composer2","purl":"pkg:rpm/opensuse/php-composer2\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:11617-1"}],"prev":{"headline":"Regular expression denial-of-service in Zulip","id":"CVE-2021-41115"},"products":["composer"],"published":"2021-10-05","related":[{"cvss_score":8.8,"headline":"Composer has Command Injection via Malicious Perforce Reference","id":"CVE-2026-40261","kev_date_added":null,"published":"2026-04-15"},{"cvss_score":8.8,"headline":"Code execution and possible privilege escalation via compromised InstalledVersions.php or installed.php in Composer","id":"CVE-2024-24821","kev_date_added":null,"published":"2024-02-08"},{"cvss_score":8.8,"headline":"Composer allows cache poisoning from other projects built on the same host","id":"CVE-2015-8371","kev_date_added":null,"published":"2023-09-21"},{"cvss_score":7.8,"headline":"Composer is vulnerable to Command Injection via Malicious Perforce Repository","id":"CVE-2026-40176","kev_date_added":null,"published":"2026-04-15"},{"cvss_score":1.3,"headline":"Composer vulnerable to ANSI sequence injection","id":"CVE-2025-67746","kev_date_added":null,"published":"2025-12-30"}],"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":"SUSE","prefix":"openSUSE"},{"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["composer"]},"summary":"Windows users installing untrusted dependencies via Composer are vulnerable to command injection, allowing attackers to execute arbitrary code.","url":"https://insights.sbomify.com/CVE-2021-41116/"}