{"answers":{"affected":"5 open source packages ship an affected version, including composer/composer and composer. It affects 3 products.","exploited":"There is no known exploitation of CVE-2021-29472 in the wild and no public exploit code.","fix":"Upgrade composer/composer to a fixed version for your release line: 1.10.22 or 2.0.13.","what":"CVE-2021-29472 is a high-severity command injection vulnerability in Debian Debian Linux, published on 27 Apr 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-29472 and fix it if it is affected.\n\nWhat it is: CVE-2021-29472 is a high-severity command injection vulnerability in Debian Debian Linux, published on 27 Apr 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-29472 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.22\n- composer/composer (Packagist): affected all versions; fixed in 1.10.22\n- composer/composer (Packagist): affected from 2.0.0-alpha1; fixed in 2.0.13\n- composer/composer (Packagist): affected from 2.0.0-alpha1; fixed in 2.0.13\n- composer (Bitnami): affected all versions; fixed in 1.10.22, 2.0.13\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-29472/ (Markdown: https://insights.sbomify.com/CVE-2021-29472/index.md)","id":"CVE-2021-29472","markdown":"https://insights.sbomify.com/CVE-2021-29472/index.md","name":"CVE-2021-29472","record":{"aliases":["BIT-composer-2021-29472","CLEANSTART-2024-XJ18859","DEBIAN-CVE-2021-29472","DLA-2654-1","DSA-4907-1","GHSA-h5h8-pc6h-jvvx","UBUNTU-CVE-2021-29472","USN-5220-1","openSUSE-SU-2021:1289-1","openSUSE-SU-2024:11166-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":"low_privilege","summary":"Attackers can execute arbitrary code via crafted Mercurial URLs in Composer, primarily affecting services like Packagist that process user-supplied inputs.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"debian_linux","vendor":"debian"},{"product":"fedora","vendor":"fedoraproject"},{"product":"composer","vendor":"getcomposer"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-88","name":"Improper Neutralization of Argument Delimiters in a Command"}],"description":"Composer is a dependency manager for PHP. URLs for Mercurial repositories in the root composer.json and package source download URLs are not sanitized correctly. Specifically crafted URL values allow code to be executed in the HgDriver if hg/Mercurial is installed on the system. The impact to Composer users directly is limited as the composer.json file is typically under their own control and source download URLs can only be supplied by third party Composer repositories they explicitly trust to download and execute source code from, e.g. Composer plugins. The main impact is to services passing user input to Composer, including Packagist.org and Private Packagist. This allowed users to trigger remote code execution. The vulnerability has been patched on Packagist.org and Private Packagist within 12h of receiving the initial vulnerability report and based on a review of logs, to the best of our knowledge, was not abused by anyone. Other services/tools using VcsRepository/VcsDriver or derivatives may also be vulnerable and should upgrade their composer/composer dependency immediately. Versions 1.10.22 and 2.0.13 include patches for this issue.","ecosystems":["Bitnami","Packagist","SUSE:Package Hub 15 SP1","SUSE:Package Hub 15 SP2","SUSE:Package Hub 15 SP3","openSUSE:Leap 15.2","openSUSE:Leap 15.3","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":"Composer's missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial","id":"CVE-2021-29472","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"debian:debian_linux","products":["debian:debian_linux","fedoraproject:fedora"],"type":"command_injection","year":"2021"},"n_packages":11,"n_references":7,"next":{"headline":"Out-of-bounds read in Exiv2::Jp2Image::doWriteMetadata","id":"CVE-2021-29473"},"packages":[{"ecosystem":"Bitnami","fixed":["1.10.22","2.0.13"],"introduced":["0","2.0.0"],"last_affected":[],"package":"composer","purl":"pkg:bitnami/composer","source":"BIT-composer-2021-29472"},{"ecosystem":"Packagist","fixed":["1.10.22"],"introduced":["0"],"last_affected":[],"package":"composer/composer","purl":null,"source":"GHSA-h5h8-pc6h-jvvx"},{"ecosystem":"Packagist","fixed":["1.10.22"],"introduced":["0"],"last_affected":[],"package":"composer/composer","purl":"pkg:composer/composer/composer","source":"GHSA-h5h8-pc6h-jvvx"},{"ecosystem":"Packagist","fixed":["2.0.13"],"introduced":["2.0.0-alpha1"],"last_affected":[],"package":"composer/composer","purl":null,"source":"GHSA-h5h8-pc6h-jvvx"},{"ecosystem":"Packagist","fixed":["2.0.13"],"introduced":["2.0.0-alpha1"],"last_affected":[],"package":"composer/composer","purl":"pkg:composer/composer/composer","source":"GHSA-h5h8-pc6h-jvvx"},{"ecosystem":"SUSE:Package Hub 15 SP1","fixed":["1.10.22-bp153.2.3.1"],"introduced":["0"],"last_affected":[],"package":"php-composer","purl":"pkg:rpm/suse/php-composer\u0026distro=SUSE%20Package%20Hub%2015%20SP1","source":"openSUSE-SU-2021:1289-1"},{"ecosystem":"SUSE:Package Hub 15 SP2","fixed":["1.10.22-bp153.2.3.1"],"introduced":["0"],"last_affected":[],"package":"php-composer","purl":"pkg:rpm/suse/php-composer\u0026distro=SUSE%20Package%20Hub%2015%20SP2","source":"openSUSE-SU-2021:1289-1"},{"ecosystem":"SUSE:Package Hub 15 SP3","fixed":["1.10.22-bp153.2.3.1"],"introduced":["0"],"last_affected":[],"package":"php-composer","purl":"pkg:rpm/suse/php-composer\u0026distro=SUSE%20Package%20Hub%2015%20SP3","source":"openSUSE-SU-2021:1289-1"},{"ecosystem":"openSUSE:Leap 15.2","fixed":["1.10.22-bp153.2.3.1"],"introduced":["0"],"last_affected":[],"package":"php-composer","purl":"pkg:rpm/opensuse/php-composer\u0026distro=openSUSE%20Leap%2015.2","source":"openSUSE-SU-2021:1289-1"},{"ecosystem":"openSUSE:Leap 15.3","fixed":["1.10.22-bp153.2.3.1"],"introduced":["0"],"last_affected":[],"package":"php-composer","purl":"pkg:rpm/opensuse/php-composer\u0026distro=openSUSE%20Leap%2015.3","source":"openSUSE-SU-2021:1289-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.10.22-2.2"],"introduced":["0"],"last_affected":[],"package":"php-composer","purl":"pkg:rpm/opensuse/php-composer\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:11166-1"}],"prev":{"headline":"Denial of service in Matrix Synapse","id":"CVE-2021-29471"},"products":["composer"],"published":"2021-04-27","related":[{"cvss_score":10,"headline":"ProFTPD Improper Access Control","id":"CVE-2015-3306","kev_date_added":"2026-10-08","published":"2015-05-18"},{"cvss_score":9.9,"headline":"RoundCube Webmail Deserialization of Untrusted Data","id":"CVE-2025-49113","kev_date_added":"2026-02-20","published":"2025-06-02"},{"cvss_score":9.8,"headline":"GNU InetUtils Argument Injection","id":"CVE-2026-24061","kev_date_added":"2026-01-26","published":"2026-01-21"},{"cvss_score":9.8,"headline":"Linux Kernel Improper Check for Unusual or Exceptional Conditions","id":"CVE-2025-39682","kev_date_added":"2026-09-18","published":"2025-09-05"},{"cvss_score":9.8,"headline":"Mozilla Firefox Use-After-Free","id":"CVE-2024-9680","kev_date_added":"2024-10-15","published":"2024-10-09"},{"cvss_score":9.8,"headline":"RARLAB UnRAR Directory Traversal","id":"CVE-2022-30333","kev_date_added":"2022-08-09","published":"2022-05-09"},{"cvss_score":9.8,"headline":"Roundcube Webmail SQL Injection","id":"CVE-2021-44026","kev_date_added":"2023-06-22","published":"2021-11-19"}],"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-03","vendors":["composer"]},"summary":"Attackers can execute arbitrary code via crafted Mercurial URLs in Composer, primarily affecting services like Packagist that process user-supplied inputs.","url":"https://insights.sbomify.com/CVE-2021-29472/"}