Live threats

All CVEs / composer

CVE-2024-35242composer

High 8.8 No auth needed

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.

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-v9qv-c7wm-wgmf). 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.