CVE-2024-35242

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-35242
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-35242.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-35242
Aliases
Downstream
Related
Published
2024-06-10T21:23:44Z
Modified
2025-10-09T07:06:44.060860Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Composer vulnerable to command injection via malicious git/hg branch names
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.

References

Affected packages

Git / github.com/composer/composer

Affected ranges

Type
GIT
Repo
https://github.com/composer/composer
Events
Type
GIT
Repo
https://github.com/composer/composer
Events
Type
GIT
Repo
https://github.com/composer/composer
Events
Type
GIT
Repo
https://github.com/composer/composer
Events

Affected versions

2.*

2.2.11
2.2.12
2.2.13
2.2.14
2.2.15
2.2.16
2.2.17
2.3.0
2.3.1
2.3.10
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
2.3.7
2.3.8
2.3.9
2.4.0
2.4.0-RC1
2.4.1
2.4.2
2.4.3
2.4.4
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.5.7
2.5.8
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.7.0
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6