Skip to content
Fencer Intel
high 8.3

CVE-2022-24828 json

Missing input validation can lead to command execution in composer

published 4y ago modified 2mo ago also BIT-composer-2022-24828 , EUVD-2022-1866 , GHSA-x7cr-6qr6-2hh6

cvss
8.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.9%
EPSS 1.9% chance of exploitation in 30 days, percentile 79%
public exploits
0
none known

Summary

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.

Patch / fix

  • packagist composer/composer 1.10.26, 2.2.12, 2.3.5
  • bitnami composer 1.10.26, 2.2.12, 2.3.5
  • getcomposer composer 1.10.26, 2.2.12, 2.3.5
  • tenable tenable.sc 5.21.0
  • composer Debian 14, Debian 13, Debian 12 2.2.12-1

debian advisories DEBIAN-CVE-2022-24828

  • composer Ubuntu Pro 16.04 LTS 1.0.0~beta2-1ubuntu0.1~esm2
  • composer Ubuntu Pro 18.04 LTS 1.6.3-1ubuntu0.1~esm2
  • composer Ubuntu Pro 20.04 LTS 1.10.1-1ubuntu0.1~esm2
  • composer Ubuntu Pro 22.04 LTS 2.2.6-2ubuntu4+esm1

ubuntu advisories UBUNTU-CVE-2022-24828

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • php-composer2 SLE Module for Web and Scripting 15 SP4, openSUSE Leap 15.4 2.2.3-150400.3.3.1

suse advisories SUSE-SU-2022:3020-1

  • php-composer2 openSUSE Tumbleweed 2.3.5-1.1
  • php-composer openSUSE Tumbleweed 1.10.26-1.1
  • php-composer Package Hub 15 SP3, openSUSE Leap 15.3 1.10.26-bp153.2.6.1

opensuse advisories openSUSE-SU-2024:12048-1openSUSE-SU-2024:12054-1openSUSE-SU-2022:0132-1

  • composer Alpine 3.15 2.2.12-r0
  • composer Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 2.3.5-r0

alpine advisories ALPINE-CVE-2022-24828

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2022-24828 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
last yr.

Exploit prediction

1.89% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CNA 3.1 8.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
GitHub 3.1 8.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
NVD 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD 2.0 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P
OSV 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
packagist composer/composer
<1.10.26
>=2.0, <2.2.12
>=2.3, <2.3.5
1.10.26
2.2.12
2.3.5
bitnami composer
<1.10.26
>=2.0.0, <2.2.12
>=2.3.0, <2.3.5
1.10.26
2.2.12
2.3.5

Affected products

  • composer composer

Classification

Weakness
  • CWE-20 Improper Input Validation
  • CWE-88 Improper Neutralization of Argument Delimiters in a Command
  • CWE-94 Improper Control of Generation of Code

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.