{"id":"UBUNTU-CVE-2024-35242","details":"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.","modified":"2026-01-30T19:25:26.078757Z","published":"2024-06-10T22:15:00Z","related":["USN-7603-1"],"upstream":["CVE-2024-35242"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2024-35242"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2024-35242"},{"type":"REPORT","url":"https://github.com/composer/composer/security/advisories/GHSA-v9qv-c7wm-wgmf"},{"type":"REPORT","url":"https://github.com/composer/composer/commit/fc57b93603d7d90b71ca8ec77b1c8a9171fdb467"},{"type":"REPORT","url":"https://github.com/composer/composer/commit/6bd43dff859c597c09bd03a7e7d6443822d0a396"},{"type":"REPORT","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC/"},{"type":"REPORT","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC/"},{"type":"REPORT","url":"https://github.com/composer/composer/commit/6bd43dff859c597c09bd03a7e7d6443822d0a396"},{"type":"REPORT","url":"https://github.com/composer/composer/commit/fc57b93603d7d90b71ca8ec77b1c8a9171fdb467"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-7603-1"}],"affected":[{"package":{"name":"composer","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/composer@1.0.0~beta2-1ubuntu0.1~esm2?arch=source&distro=esm-apps/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.0~beta2-1ubuntu0.1~esm2"}]}],"versions":["1.0.0~alpha10+20150602-1","1.0.0~alpha10+20150602-2","1.0.0~alpha11-1","1.0.0~alpha11-1ubuntu1","1.0.0~alpha11-2","1.0.0~alpha11-3","1.0.0~beta1-1ubuntu1","1.0.0~beta2-1","1.0.0~beta2-1ubuntu0.1~esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"composer","binary_version":"1.0.0~beta2-1ubuntu0.1~esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-35242.json"}},{"package":{"name":"composer","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/composer@1.6.3-1ubuntu0.1~esm2?arch=source&distro=esm-apps/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.3-1ubuntu0.1~esm2"}]}],"versions":["1.5.1-1","1.5.2-1","1.6.2-1","1.6.3-1","1.6.3-1ubuntu0.1~esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"composer","binary_version":"1.6.3-1ubuntu0.1~esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-35242.json"}},{"package":{"name":"composer","ecosystem":"Ubuntu:Pro:20.04:LTS","purl":"pkg:deb/ubuntu/composer@1.10.1-1ubuntu0.1~esm2?arch=source&distro=esm-apps/focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.1-1ubuntu0.1~esm2"}]}],"versions":["1.9.0-2","1.9.1-1","1.9.2-1","1.9.3-1","1.10.0-1","1.10.1-1","1.10.1-1ubuntu0.1~esm1"],"ecosystem_specific":{"binaries":[{"binary_name":"composer","binary_version":"1.10.1-1ubuntu0.1~esm2"}],"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-35242.json"}},{"package":{"name":"composer","ecosystem":"Ubuntu:Pro:22.04:LTS","purl":"pkg:deb/ubuntu/composer@2.2.6-2ubuntu4+esm1?arch=source&distro=esm-apps/jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.6-2ubuntu4+esm1"}]}],"versions":["2.0.9-2ubuntu2","2.0.9-2ubuntu3","2.0.13-1ubuntu1","2.1.12-1ubuntu1","2.2.6-2ubuntu4"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"composer","binary_version":"2.2.6-2ubuntu4+esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-35242.json"}},{"package":{"name":"composer","ecosystem":"Ubuntu:Pro:24.04:LTS","purl":"pkg:deb/ubuntu/composer@2.7.1-2ubuntu0.1~esm1?arch=source&distro=esm-apps/noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1-2ubuntu0.1~esm1"}]}],"versions":["2.5.8-1","2.6.5-1","2.6.6-1","2.7.1-2"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"composer","binary_version":"2.7.1-2ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-35242.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}