ADVISORIES

Vulnerability

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.

15 advisories report this vulnerability, across 9 ecosystems.

Advisories

  • ALAS2023-2024-659

    Amazon Linux 2023 - ALAS2023-2024-659: Important priority package update for composer

    Important CVE-2024-35242 Amazon Linux Updated 22 July 2024
  • ALPINE-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…

    CVE-2024-35242 Alpine Updated 3 November 2026
  • ALPINE-EDGE-CVE-2024-35242
    CVE-2024-35242 Alpine Updated 18 November 2026
  • CGA-qwx8-f8j4-g4p6
    CVE-2024-35242 ChainguardWolfi Updated 5 November 2026
  • CGA-x9p4-6mc7-h539
    CVE-2024-35242 ChainguardWolfi Updated 5 November 2026
  • DEBIAN-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…

    CVE-2024-35242 Debian Updated 2 November 2026
  • DLA-3838-1

    composer - security update

    CVE-2024-35241CVE-2024-35242 Debian Updated 20 November 2026
  • DSA-5715-1

    composer - security update

    CVE-2024-35241CVE-2024-35242 Debian Updated 20 November 2026
  • GHSA-v9qv-c7wm-wgmf

    Composer has multiple command injections via malicious git/hg branch names

    High CVE-2024-35242 Packagist Updated 10 September 2026
  • SUSE-SU-2024:2106-1

    Security update for php-composer2

    CVE-2024-35241CVE-2024-35242 SUSEopenSUSE Updated 4 February 2026
  • SUSE-SU-2024:2107-1

    Security update for php-composer2

    CVE-2024-35241CVE-2024-35242 SUSEopenSUSE Updated 4 February 2026
  • SUSE-SU-2026:3105-1

    Security update for php-composer2

    CVE-2024-35241CVE-2024-35242CVE-2025-67746CVE-2026-40176 SUSE Updated 18 July 2026
  • UBUNTU-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…

    CVE-2024-35242 Ubuntu Updated 5 February 2026
  • USN-7603-1

    composer vulnerabilities

    CVE-2022-24828CVE-2023-43655CVE-2024-24821CVE-2024-35241 Ubuntu Updated 25 June 2026
  • openSUSE-SU-2024:14040-1

    php-composer2-2.7.7-1.1 on GA media

    CVE-2024-35241CVE-2024-35242 openSUSE Updated 4 February 2026

References