CVE-2022-24828: Missing input validation can lead to command execution in composer
Vulnerability summary
CVE-2022-24828 is a high (CVSS 8.8) Improper Input Validation vulnerability in composer. EPSS estimates a 1.89% chance of exploitation in the next 30 days, higher than 80.2% of scored vulnerabilities.
Not severe (CVSS 8.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2 · Related 2Timeline
- 13-04-2022PublishedVulnerability first disclosed.
- 23-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 5 sources · 2 versions- CVE.orgCNA8.3HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.89%
Chance of exploitation in the next 30 days
Percentile
80%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.89% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-20Improper Input ValidationThe product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
- CWE-88Improper Neutralization of Argument Delimiters in a CommandThe product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.
Affected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Opensuse3 products
- php-composer2&distro=openSUSE Leap 15.4< 2.2.3-150400.3.3.1
- php-composer2&distro=openSUSE Tumbleweed< 2.3.5-1.1
- php-composer&distro=openSUSE Tumbleweed< 1.10.26-1.1
Alpine1 product
- composer≥ 2.0.0, < 2.3.5-r0 | ≥ 2.0.0, < 2.2.12-r0 | ≥ 2.3.0, < 2.3.5-r0
Composer1 product
- composer< 1.10.26 | ≥ 2.0.0, < 2.2.12 | ≥ 2.3, < 2.3.6
Debian1 product
- composer< 2.2.12-1
Fedoraproject1 product
- fedoraEOL34 | 35 | 36
Getcomposer1 product
- composer< 1.10.26 | ≥ 2.0.0, < 2.2.12 | ≥ 2.3.0, < 2.3.5
Suse1 product
- php-composer2&distro=SUSE Linux Enterprise Module for Web and Scripting 15 SP4< 2.2.3-150400.3.3.1
Tenable1 product
- tenable.sc< 5.21.0
Ubuntu1 product
- composer< 1.0.0~beta2-1ubuntu0.1~esm2 | < 1.6.3-1ubuntu0.1~esm2 | < 1.10.1-1ubuntu0.1~esm2 | < 2.2.6-2ubuntu4+esm1
9 vendors · 11 products
References
14 links- github.com/composer/composer/security/advisories/GHSA-x7cr-6qr6-2hh6X Refsource CONFIRMREPORTThird Party Advisory
- github.com/composer/composer/commit/2c40c53637c5c7e43fff7c09d3d324d632734709X Refsource MISCREPORTPatchThird Party Advisory