ADVISORIES

Vulnerability

CVE-2022-24828

Composer is a dependency manager for the PHP programming language. Integrators using Composer code to call `VcsDriver::getFileContent` can have a code injection vulnerability if the user can control the `$file` or `$identifier` argument. This leads to a vulnerability on packagist.org for example where the composer.json's `readme` field can be used as a vector for injecting parameters into hg/Mercurial via the `$file` argument, or git via the `$identifier` argument if you allow arbitrary data there (Packagist does not, but maybe other integrators do). Composer itself should not be affected by the vulnerability as it does not call `getFileContent` with arbitrary data into `$file`/`$identifier`. To the best of our knowledge this was not abused, and the vulnerability has been patched on packagist.org and Private Packagist within a day of the vulnerability report.

10 advisories report this vulnerability, across 6 ecosystems.

Advisories

  • ALPINE-CVE-2022-24828

    Composer is a dependency manager for the PHP programming language. Integrators using Composer code to call `VcsDriver::getFileContent` can have a code injection vulnerability if the user can control the `$file` or…

    CVE-2022-24828 Alpine Updated 20 November 2026
  • ALPINE-EDGE-CVE-2022-24828
    CVE-2022-24828 Alpine Updated 18 November 2026
  • DEBIAN-CVE-2022-24828

    Composer is a dependency manager for the PHP programming language. Integrators using Composer code to call `VcsDriver::getFileContent` can have a code injection vulnerability if the user can control the `$file` or…

    CVE-2022-24828 Debian Updated 20 November 2026
  • GHSA-x7cr-6qr6-2hh6

    Missing input validation can lead to command execution in composer

    High CVE-2022-24828 Packagist Updated 21 February 2024
  • SUSE-SU-2022:3020-1

    Security update for php-composer2

    CVE-2022-24828 SUSEopenSUSE Updated 4 February 2026
  • UBUNTU-CVE-2022-24828

    Composer is a dependency manager for the PHP programming language. Integrators using Composer code to call `VcsDriver::getFileContent` can have a code injection vulnerability if the user can control the `$file` or…

    CVE-2022-24828 Ubuntu Updated 4 February 2026
  • USN-7603-1

    composer vulnerabilities

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

    Security update for php-composer

    CVE-2021-41116CVE-2022-24828 SUSEopenSUSE Updated 4 February 2026
  • openSUSE-SU-2024:12048-1

    php-composer2-2.3.5-1.1 on GA media

    CVE-2022-24828 openSUSE Updated 4 February 2026
  • openSUSE-SU-2024:12054-1

    php-composer-1.10.26-1.1 on GA media

    CVE-2022-24828 openSUSE Updated 4 February 2026

References