VDB

CVE-2022-24828

CVE-2022-24828 PUBLISHED CVSS 8.3 HIGH

Missing input validation can lead to command execution in composer

Reported by github_m · Published April 13, 2022

composer/composer is fixed in 2.3.5, 2.2.12 and 1.10.26 (Packagist)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
composer/composerPackagist2.3.5, 2.2.12, 1.10.26
composerBitnami2.3.5, 2.2.12, 1.10.26
tenable.sctenable5.21.0
composergetcomposer2.3.5, 2.2.12, 1.10.26

Risk scores

CVSS 3.1
8.3
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected products

VendorProductVersions
composercomposer< 1.10.26, >= 2.0.0, < 2.2.12, >= 2.3, < 2.3.6
composercomposer2.3.0, 2.0, 0
composercomposer2.3, 0, 2.0.0
alpinecomposer0, 0

Timeline

  • Apr 13, 2022 CVE Published
  • Apr 14, 2022 EPSS Score (30 in total, the first dated here)
  • Apr 22, 2022 CVE Updated
  • Mar 17, 2026 Security Advisory (2 in total, the first dated here)
  • Jul 2, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-24828
vulnetix vdb fixes CVE-2022-24828

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-24828/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›