{"answers":{"affected":"5 open source packages ship an affected version, including composer/composer and composer.","exploited":"There is no known exploitation of CVE-2024-35241 in the wild and no public exploit code.","fix":"Upgrade composer/composer to a fixed version for your release line: 2.2.24 or 2.7.7.","what":"CVE-2024-35241 is a high-severity command injection vulnerability in composer, published on 10 Jun 2024. 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-2024-35241 and fix it if it is affected.\n\nWhat it is: CVE-2024-35241 is a high-severity command injection vulnerability in composer, published on 10 Jun 2024. 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-2024-35241 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- composer/composer (Packagist): affected from 2.0; fixed in 2.2.24\n- composer/composer (Packagist): affected from 2.0; fixed in 2.2.24\n- composer/composer (Packagist): affected from 2.3; fixed in 2.7.7\n- composer/composer (Packagist): affected from 2.3; fixed in 2.7.7\n- composer (Bitnami): affected from 2.0.0; fixed in 2.2.24, 2.7.7\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-2024-35241/ (Markdown: https://insights.sbomify.com/CVE-2024-35241/index.md)","id":"CVE-2024-35241","markdown":"https://insights.sbomify.com/CVE-2024-35241/index.md","name":"CVE-2024-35241","record":{"aliases":["BIT-composer-2024-35241","CLEANSTART-2024-ND02975","DEBIAN-CVE-2024-35241","GHSA-47f6-5gq3-vx9c","UBUNTU-CVE-2024-35241"],"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":"Attackers can execute arbitrary code via malicious git branch names when using Composer's status, reinstall, or remove commands.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `status`, `reinstall` and `remove` commands with packages installed from source via git containing specially crafted branch names in the repository can be used to execute code. Patches for this issue are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid installing dependencies via git by using `--prefer-dist` or the `preferred-install: dist` config setting.","ecosystems":["Bitnami","Packagist"],"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 vulnerable to command injection via malicious git branch name","id":"CVE-2024-35241","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"command_injection","year":"2024"},"n_packages":5,"n_references":5,"next":{"headline":"Composer vulnerable to command injection via malicious git/hg branch names","id":"CVE-2024-35242"},"packages":[{"ecosystem":"Bitnami","fixed":["2.2.24","2.7.7"],"introduced":["2.0.0","2.3.0"],"last_affected":[],"package":"composer","purl":"pkg:bitnami/composer","source":"BIT-composer-2024-35241"},{"ecosystem":"Packagist","fixed":["2.2.24"],"introduced":["2.0"],"last_affected":[],"package":"composer/composer","purl":null,"source":"GHSA-47f6-5gq3-vx9c"},{"ecosystem":"Packagist","fixed":["2.2.24"],"introduced":["2.0"],"last_affected":[],"package":"composer/composer","purl":"pkg:composer/composer/composer","source":"GHSA-47f6-5gq3-vx9c"},{"ecosystem":"Packagist","fixed":["2.7.7"],"introduced":["2.3"],"last_affected":[],"package":"composer/composer","purl":null,"source":"GHSA-47f6-5gq3-vx9c"},{"ecosystem":"Packagist","fixed":["2.7.7"],"introduced":["2.3"],"last_affected":[],"package":"composer/composer","purl":"pkg:composer/composer/composer","source":"GHSA-47f6-5gq3-vx9c"}],"prev":{"headline":"Stored Cross-site Scripting on Print Functionality in Umbraco Commerce","id":"CVE-2024-35240"},"products":["composer"],"published":"2024-06-10","related":[],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-21","vendors":["composer"]},"summary":"Attackers can execute arbitrary code via malicious git branch names when using Composer's status, reinstall, or remove commands.","url":"https://insights.sbomify.com/CVE-2024-35241/"}