CVE-2022-24828 json
Missing input validation can lead to command execution in composer
published 2022-04-13 4 y ago modified 2026-09-08 2 mo 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
- github.com/composer/composer@2c40c53 commit
- tenable.com/security/tns-2022-09 advisory
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 18 mo ago
Exploit prediction
1.89% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-08).
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
References
-
github.com
/composer/composer/commit/2c40c53637c5c7e43fff7c09d3d324d632734709
web, patch, third-party-advisory, advisory
-
tenable.com
/security/tns-2022-09
web, patch, third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/QD7JQWL6C4GVROO25DTXWYWM6BPOPPCG/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/GWT6LDSRY7SFMTDZWJ4MS2ZBXHL7VQEF/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/625MT3IKWKFVIWLSYZFSXHVUA2LES7YQ/
vendor-advisory, web
-
github.com
/composer/composer/security/advisories/GHSA-x7cr-6qr6-2hh6
web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-24828
advisory, web
-
github.com
/FriendsOfPHP/security-advisories/blob/master/composer/composer/CVE-2022-24828.yaml
web
-
github.com
/composer/composer
package
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/625MT3IKWKFVIWLSYZFSXHVUA2LES7YQ
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/GWT6LDSRY7SFMTDZWJ4MS2ZBXHL7VQEF
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/QD7JQWL6C4GVROO25DTXWYWM6BPOPPCG
web
Sources
- CVE List CVE-2022-24828
- GitHub Advisory GHSA-x7cr-6qr6-2hh6
- NVD CVE-2022-24828
- OSV BIT-composer-2022-24828
Fencer Vulns 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.