CVE-2024-35241composer
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
- 1.5% probability of exploitation in 30 days · percentile 74
- 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 `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.
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-47f6-5gq3-vx9c). 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.