CVE-2022-24828 is a high-severity (CVSS 8.3) Improper Input Validation vulnerability in composer/composer. A fix is available for composer/composer — see the affected versions and patch details below.
Missing input validation can lead to command execution in composer
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-24828.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
composer/composer🐘composer/composer🐘composer/composerReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | composer/composer | all versions | 1.10.26composer require composer/composer:^1.10.26 |
| 🐘Packagist | composer/composer | ≥ 2.0&&< 2.2.12 | 2.2.12composer require composer/composer:^2.2.12 |
| 🐘Packagist | composer/composer | ≥ 2.3&&< 2.3.5 | 2.3.5composer require composer/composer:^2.3.5 |
Affected Products
fedorafedoraprojectcomposergetcomposertenable.sctenableDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for composer/composer, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update composer/composer to 1.10.26 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-24828 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2022-24828 in your dependencies?
Find it across Packagist, including transitive dependencies.