{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-35242","id":"CVE-2024-35242","title":"Composer vulnerable to command injection via malicious git/hg branch names","description":"Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `composer install` command running inside a git/hg repository which has specially crafted branch names can lead to command injection. This requires cloning untrusted repositories. Patches are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid cloning potentially co","descriptionLong":"Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `composer install` command running inside a git/hg repository which has specially crafted branch names can lead to command injection. This requires cloning untrusted repositories. Patches are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid cloning potentially compromised repositories.","published":"2024-06-10T21:23:44.040Z","updated":"2026-11-11T10:47:09.039998101Z","reserved":"2024-05-14T15:39:41.786Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["composer"],"affectedProducts":[{"vendor":"composer","product":"composer","defaultStatus":null,"versions":[{"version":">= 2.0, < 2.2.24","status":"affected"},{"version":">= 2.3, < 2.7.7","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"composer/composer","purl":"pkg:composer/composer/composer","ranges":[">=2.0 <2.2.24",">=2.3 <2.7.7"],"fixed":["2.2.24","2.7.7"],"advisory":"GHSA-v9qv-c7wm-wgmf"}],"cwes":["CWE-77"],"aliases":["BIT-composer-2024-35242","GHSA-v9qv-c7wm-wgmf"],"references":[{"url":"https://github.com/composer/composer/security/advisories/GHSA-v9qv-c7wm-wgmf","tags":["x_refsource_CONFIRM","x_transferred","advisory","web"]},{"url":"https://github.com/composer/composer/commit/6bd43dff859c597c09bd03a7e7d6443822d0a396","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/composer/composer/commit/fc57b93603d7d90b71ca8ec77b1c8a9171fdb467","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC/","tags":["x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC/","tags":["x_transferred","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35242.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35242","tags":["advisory"]},{"url":"https://github.com/composer/composer","tags":["package"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.03282,"epssPercentile":0.88718,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-35242","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35242","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-35242","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-v9qv-c7wm-wgmf","ok":true,"note":"GHSA-v9qv-c7wm-wgmf"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-35242","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}