BuzzPHP
LightDarkSystem

Composer: Arbitrary file write outside vendor via malicious transitive package name

High severity. Published 20 July 2026. Update composer/composer to the fixed version of your branch (2.10.2, 2.2.29): composer update composer/composer.

Which versions are affected?

PackageAffected versionsFixed in
composer/composer (opens in a new tab)>= 2.3.0, < 2.10.2 | >= 1.0.0, < 2.2.292.10.2, 2.2.29

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show composer/composer
composer audit

Advisory details

SeverityHighCVSS 7
Published
Updated
CVECVE-2026-59948 (opens in a new tab)
GHSAGHSA-499r-g7pc-vmp9 (opens in a new tab)
WeaknessCWE-22, CWE-787

What the advisory says

Summary

A maliciously crafted package, published on an untrusted third party repository other than Packagist.org or Private Packagist, can cause Composer to write files outside the vendor/ directory and outside your project, with attacker-controlled content, during a normal install or update through using an invalid package name, which was not correctly validated by Composer.

This is an arbitrary file write that can be used to execute code outside the Composer project's context in which you expected the package code to execute (for example by writing shell startup files, SSH authorizedkeys, or a cron entry).

Source: GHSA-499r-g7pc-vmp9 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories