CVE-2026-40261: Composer is a dependency manager for PHP
CVE-2026-40261 is a high-severity flaw (CVSS 8.8) affecting composer. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::syncCodeBase() method, which appends the $sourceReference parameter to a shell command without proper escaping, and additionally in the Perforce::generateP4Command() method as in GHSA-wg36-wvj6-r67p / CVE-2026-40176, which interpolates user-supplied Perforce connection parameters (port, user, clien
Why this priority
- High severity
A fixed release or distro patch exists.
Last updated 2026-07-15 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-40261?
composer: upgrade to newer than 2.9.5. Exact commands for each OS are on this page.
Is CVE-2026-40261 being exploited?
CVE-2026-40261 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-40261 affect?
CVE-2026-40261 affects composer. Severity is high (CVSS 8.8). Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::syncCodeBase() method, which appends the $sourceReference parameter to a shell command wi
How urgent is CVE-2026-40261?
Priority 50/100. High severity
Software pages
Related CVEs
- CVE-2026-40176 HIGH 7.8 UPGRADE Composer is a dependency manager for PHP