Missing input validation can lead to command execution in composerGHSA-x7cr-6qr6-2hh6
HIGHFix: composer/composer@2c40c53GHSA-x7cr-6qr6-2hh6 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.
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 GHSA-x7cr-6qr6-2hh6.
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
The Composer method VcsDriver::getFileContent() with user-controlled $file or $identifier arguments is susceptible to an argument injection vulnerability. It can be leveraged to gain arbitrary command execution if the Mercurial or the Git driver are used.
This led to a vulnerability on Packagist.org and Private Packagist, i.e., using the composer.json readme field as a vector for injecting parameters into the $file argument for the Mercurial driver or via the $identifier argument for the Git and Mercurial drivers.
Composer itself can be attacked through branch names by anyone controlling a Git or Mercurial repository, which is explicitly listed by URL in a project's composer.json.
To the best of our knowledge, this was not actively exploited. 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 GHSA-x7cr-6qr6-2hh6 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Frequently Asked Questions
Is GHSA-x7cr-6qr6-2hh6 in your dependencies?
Find it across Packagist, including transitive dependencies.