CVE-2026-59948 Details
Description
Composer is a dependency Manager for the PHP language. Prior to 2.2.29 and 2.10.2, a maliciously crafted package from an untrusted repository other than Packagist.org or Private Packagist can cause Composer to write attacker-controlled files outside the vendor directory and outside the project during install or update by using an invalid package name that is not correctly validated before dependency-resolution results are written or installed. This issue is fixed in versions 2.2.29 and 2.10.2.
A vulnerability in Composer, a dependency manager for PHP, allows a maliciously crafted package from an untrusted repository (excluding Packagist.org or Private Packagist) to write attacker-controlled files outside the vendor directory and the project itself. This occurs during the installation or update process, using an invalid package name that bypasses proper validation before dependency resolution results are applied. The vulnerability is present in Composer versions prior to 2.2.29 and 2.10.2.
Users can update to Composer versions 2.2.29 or 2.10.2, both of which include the necessary validation to prevent this vulnerability. Instructions for updating Composer can be found in the Composer documentation.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 8, 2026CISA-ADP
Assessed Jul 9, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/composer/composer/commit/502c6c4f699802d9cf464728b3e8a95674f919a0 | [email protected] | Source CodeVendor |
| https://github.com/composer/composer/commit/c50b1efd13ebd73f6dca19b31424c5a02bf93cc1 | [email protected] | Source CodeVendor |
| https://github.com/composer/composer/releases/tag/2.10.2 | [email protected] | Release NotesVendor |
| https://github.com/composer/composer/releases/tag/2.2.29 | [email protected] | Release NotesVendor |
| https://github.com/composer/composer/security/advisories/GHSA-499r-g7pc-vmp9 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
| CWE-787 | Out-of-bounds Write | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Composer | >= 2.3.0, < 2.10.2 (semver) >= 1.0, < 2.2.29 |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 9, 2026 | CVE Modified | CISA-ADP |
| Jul 8, 2026 | New CVE Received | [email protected] |
Volerion