CVE-2022-24828
published high CVSS 3.1 · 8.3Missing input validation can lead to command execution in composer
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| composer | — | composer< 1.10.26 · >= 2.0.0, < 2.2.12 · >= 2.3, < 2.3.6 | Affected | Not stated | GitHub_M |
| Alpine Linux | edge | composer | Fixed | 2.3.5-r0 | Package fix record |
| Ubuntu | bionic | composer | Advisory build | 1.6.3-1ubuntu0.1~esm2 | USN-7603-1 |
| SUSE / openSUSE | SLE-15-SP4 | php-composer2noarch | Advisory build | 2.2.27-150400.3.18.1 | SUSE-SU-2026:1970-1 |
| Alpine Linux | v3.15 | composer | Fixed | 2.2.12-r0 | Package fix record |
| Alpine Linux | v3.16 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Alpine Linux | v3.17 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Alpine Linux | v3.18 | composer | Fixed | 2.3.5-r0 | Package fix record |
Show 21 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.19 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Alpine Linux | v3.20 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Alpine Linux | v3.21 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Alpine Linux | v3.22 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Alpine Linux | v3.23 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Alpine Linux | v3.24 | composer | Fixed | 2.3.5-r0 | Package fix record |
| Ubuntu | focal | composer | Advisory build | 1.10.1-1ubuntu0.1~esm2 | USN-7603-1 |
| Ubuntu | jammy | composer | Advisory build | 2.2.6-2ubuntu4+esm1 | USN-7603-1 |
| Ubuntu | xenial | composer | Advisory build | 1.0.0~beta2-1ubuntu0.1~esm2 | USN-7603-1 |
| SUSE / openSUSE | SLE-15-SP4 | php-composer2noarch | Advisory build | 2.2.3-150400.3.3.1 | SUSE-SU-2022:3020-1 |
| SUSE / openSUSE | SLE-15-SP5 | php-composer2noarch | Advisory build | 2.2.27-150400.3.18.1 | SUSE-SU-2026:1970-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | php-composernoarch | Advisory build | 1.10.26-bp153.2.6.1 | OPENSUSE-SU-2022:0132-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | php-composer2noarch | Advisory build | 2.2.3-150400.3.3.1 | SUSE-SU-2022:3020-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composeraarch64 | Advisory build | 1.10.26-1.1 | OPENSUSE-SU-2024:12054-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composerppc64le | Advisory build | 1.10.26-1.1 | OPENSUSE-SU-2024:12054-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composers390x | Advisory build | 1.10.26-1.1 | OPENSUSE-SU-2024:12054-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composerx86_64 | Advisory build | 1.10.26-1.1 | OPENSUSE-SU-2024:12054-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2aarch64 | Advisory build | 2.3.5-1.1 | OPENSUSE-SU-2024:12048-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2ppc64le | Advisory build | 2.3.5-1.1 | OPENSUSE-SU-2024:12048-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2s390x | Advisory build | 2.3.5-1.1 | OPENSUSE-SU-2024:12048-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2x86_64 | Advisory build | 2.3.5-1.1 | OPENSUSE-SU-2024:12048-1 |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.3 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| composer | composer | < 1.10.26 (affected)>= 2.0.0, < 2.2.12 (affected)>= 2.3, < 2.3.6 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-20 CWE-20: Improper Input Validation
References
6- https://github.com/composer/composer/commit/2c40c53637c5c7e43fff7c09d3d324d632734709
- https://github.com/composer/composer/security/advisories/GHSA-x7cr-6qr6-2hh6
- FEDORA-2022-60ec715192 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/625MT3IKWKFVIWLSYZFSXHVUA2LES7YQ/
- FEDORA-2022-47d2e7da46 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GWT6LDSRY7SFMTDZWJ4MS2ZBXHL7VQEF/
- FEDORA-2022-617a6df23e https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QD7JQWL6C4GVROO25DTXWYWM6BPOPPCG/
- https://www.tenable.com/security/tns-2022-09
Provider assertions
3GitHub_M · cna
Missing input validation can lead to command execution in composer
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 247ba193441e7a203cb2654c8275b3178565c5c617f26078c2103e80820e634f
- Ingested
- 23 Sep 2026, 07:58:57 UTC
- Source record
- Official CVE record