CVE-2026-59944: Composer: GHSA-gjfg-22fp-rrxx fix bypass via symlinked package bin path
Summary A malicious or compromised Composer package could, when installed as a dependency, cause Composer to change the permissions of a file outside that package's own directory and to register a runnable vendor/bin command that points at that outside file. This is a path traversal and link following issue. It is not remote code execution, the attacker gains no ability to read or receive your data directly.
Published Oct 2, 2026
Affected packages
composer/composer
- Ecosystem
- Composer (PHP)
- Affected
- >= 2.3.0, < 2.10.3
- Fixed in
- 2.10.3
- Check
composer show composer/composer
composer/composer
- Ecosystem
- Composer (PHP)
- Affected
- >= 1.0, < 2.2.30
- Fixed in
- 2.2.30
- Check
composer show composer/composer
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A malicious or compromised Composer package could, when installed as a dependency, cause Composer to change the permissions of a file outside that package's own directory and to register a runnable vendor/bin command that points at that outside file. This is a path traversal and link following issue. It is not remote code execution, the attacker gains no ability to read or receive your data directly. The risk is that a file which was readable only by its owner, but modifiable by Composer, can be made world readable and executable, which is enough to expose its contents on a shared or multi tenant host. The earlier hardening from GHSA-gjfg-22fp-rrxx can be bypassed, since it only rejected literal .. path segments in a package's declared binaries, and was only applied in a single place during dependency resolution.
Am I affected?
You can be affected if a malicious or compromised package, including a transitive dependency, is installed in your project, and either of the following is true:
- The dependency package ships one of its declared binaries as a symbolic link that resolves to a location outside the package's own directory. Nothing beyond a normal install or update is required.
- Or, the recorded metadata of your installed dependencies (
vendor/composer/installed.json) declares a binary path that escapes the package's directory. Composer regenerates missing binaries from that recorded metadata at the end of an install, and uses this metadata for reinstalls of the same package. In both of these cases the validation applied during dependency resolution is skipped. This situation is only reachable when yourvendordirectory is not populated from the same install run, which performs validation. For example a vendor directory restored from a shared or untrusted CI cache, copied in from an earlier container build stage, carried over from a Composer older than 2.10.2 or 2.2.29, or writable by a lower trust build step, could contain such malicious data.
The most realistic way to get hit is a composer install in a build or deploy step that reuses a vendor directory produced elsewhere, since the permission change is applied silently and with the privileges of the user running Composer.
Patched versions
Composer now verifies that each declared binary resolves to a path inside the installing package's own directory before it touches the file, and skips any binary that resolves outside it with a warning. Update to the patched releases (2.10.3 and 2.2.30).
Workarounds
Upgrading is the only complete fix.
Credited to DavidCarliez, manus-use, arpitjain099.
References
- https://github.com/composer/composer/security/advisories/GHSA-96h3-5x6v-m776
- https://nvd.nist.gov/vuln/detail/CVE-2026-59944
- https://github.com/composer/composer/commit/53b8bb4c24697b2f00a18cf1ef35a10392701b89
- https://github.com/composer/composer/commit/ad649fdfdf8ed826d4a34e0e5690c76a0b4833aa
- https://github.com/composer/composer/releases/tag/2.10.3
- https://github.com/composer/composer/releases/tag/2.2.30
- https://github.com/advisories/GHSA-96h3-5x6v-m776
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-84361
Composer arbitrary command execution via a malicious package's Perforce source URL
high7.7Sep 8, 2026CVE-2026-59946
Composer: Path traversal in package bin field lets dependencies chmod arbitrary host files
medium6.1Jul 20, 2026CVE-2026-59947
Composer: URL-embedded HTTP-Basic username leaks to verbose logs (GitHub PAT exposure)
medium4.7Jul 20, 2026CVE-2026-59948
Composer: Arbitrary file write outside vendor via malicious transitive package name
high7.0Jul 20, 2026CVE-2026-45793
Github Actions issued GITHUB_TOKEN disclosure in GitHub Actions logs
high7.5May 19, 2026CVE-2026-40176
Composer has a command injection via malicious perforce repository
high7.8Apr 14, 2026
