CVEfocus › CVE database › CVE-2022-24828

CVE-2022-24828Missing input validation can lead to command execution in composer

CVSS 8.3 HighEPSS 1.6% (higher than 76% of CVEs)Published 2022-04-13Updated 2025-04-23Assigner: GitHub_M

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.

CWE-20

What to do

Fixed builds are available from Alpine, Debian, Packagist: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

14Fixed
4Fix pending
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04composerNot affected
vulnerable_code_not_present
Ubuntu 25.10composerNot affected
vulnerable_code_not_present
Ubuntu 22.04composerFix pending2.2.6-2ubuntu4+esm1 (Ubuntu Pro)UBUNTU-CVE-2022-24828
Ubuntu 20.04composerFix pending1.10.1-1ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2022-24828
Ubuntu 18.04composerFix pending1.6.3-1ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2022-24828
Ubuntu 16.04composerFix pending1.0.0~beta2-1ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2022-24828
Debian 14composerFixed2.2.12-1DEBIAN-CVE-2022-24828
Debian 13composerFixed2.2.12-1DEBIAN-CVE-2022-24828
Debian 12composerFixed2.2.12-1DEBIAN-CVE-2022-24828
Alpine Linux 3.24composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.23composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.22composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.21composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.20composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.19composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.18composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.17composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.16composerFixed2.3.5-r0ALPINE-CVE-2022-24828
Alpine Linux 3.15composerFixed2.2.12-r0ALPINE-CVE-2022-24828
Packagist librarycomposer/composerFixed2.2.12GHSA-x7cr-6qr6-2hh6

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.