CVE-2026-59946 Composer: Path traversal in package bin field lets dependencies chmod arbitrary host files

Medium 6.1 Published Updated

A malicious Composer package can use path traversal in its bin field to chmod arbitrary host files, potentially leading to privilege escalation or data modification.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-59946?

CVE-2026-59946 is a medium-severity path traversal vulnerability in composer, published on 8 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

Composer is a dependency Manager for the PHP language. Prior to 2.2.29 and 2.10.2, a Composer package bin entry containing .. path segments can resolve outside the package install directory and cause Composer's binary installation flow to chmod an existing host file to a world-readable and world-executable mode during composer install, update, or require. This issue is fixed in versions 2.2.29 and 2.10.2.

Weakness: CWE-732, CWE-22

Which versions are affected by CVE-2026-59946?

5 open source packages ship an affected version, including composer/composer and composer.

PackageAffectedFixed in
composer/composer PackagistFrom 1.0.02.2.29
composer/composer PackagistFrom 1.0.02.2.29
composer/composer PackagistFrom 2.3.02.10.2
composer/composer PackagistFrom 2.3.02.10.2
composer BitnamiFrom 1.0.02.2.29, 2.10.2
Linux distribution packages (1)
composer Red Hat:hummingbird:1All versions0:2.10.2-1.hum1

How do I fix CVE-2026-59946?

Upgrade composer/composer to a fixed version for your release line: 2.2.29 or 2.10.2.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-59946 being exploited?

There is no known exploitation of CVE-2026-59946 in the wild and no public exploit code.

Sources

Also known as BIT-composer-2026-59946, CLEANSTART-2026-XS00515, DEBIAN-CVE-2026-59946, GHSA-gjfg-22fp-rrxx, MINI-2x76-2c3f-vphj, MINI-xvgc-rq86-jjv9 and 2 more.

Is CVE-2026-59946 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free