CVE-2024-35242composer
High 8.8 No auth needed
Follow: this CVE · composer · composer We alert you by email or Slack (account required).
- Priority
- 68
- CVSS 3.1
- 8.8
- EPSS
- 4.6% probability of exploitation in 30 days · percentile 92
- Auth required
- No
- Published
- Jun 10, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-77
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for composer.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | composer/composer |
≥ 2.0 < 2.2.24 |
2.2.24 |
composer require "composer/composer:^2.2.24" |
| Packagist | composer/composer |
≥ 2.3 < 2.7.7 |
2.7.7 |
composer require "composer/composer:^2.7.7" |
Per OSV / GitHub Advisories (GHSA-v9qv-c7wm-wgmf). Check the version in your lockfile before upgrading.
Affected products
- composer · composer
- fedoraproject · fedora
- getcomposer · composer
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- Security update for php-composer2 · SUSE · SUSE-SU-2026:3105-1 · Jul 17, 2026 High
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.