RCE in Composer

CVE-2024-35242

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.

Vulnerability class: Command Injection (OS Command Injection)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.

EPSS exploit prediction

EPSS: 0.033 (88.1th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 88th percentile — 88.1% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2024-35242: held from 0.033 to 0.033.

EPSS over last 30 days · oldest: 0.033 · newest: 0.033 · change: 0.000

Affected products

  • Composer — versions >= 2.0, < 2.2.24, >= 2.3, < 2.7.7

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2024-35242?
CVE-2024-35242 is a high-severity vulnerability in Composer, classified under Command Injection. CVSS score: 8.8/10. Published 2024-06-10.
How severe is CVE-2024-35242?
High severity. CVSS v3 base score is 8.8 out of 10.
Is CVE-2024-35242 known to be exploited?
3 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.