Live threats

All CVEs / composer

CVE-2024-35241composer

High 8.8 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for composer.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.