Composer: Arbitrary file write outside vendor via malicious transitive package name
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 authorized_keys, or a cron entry). It is a supply-chain issue: it requires a malicious or compromised package to be present in the dependency graph, it is not otherwise remotely exploitable against a machine.
The fix makes Composer validate every package produced by dependency resolution before anything is written to composer.lock or installed, and abort with a security error if a package name is not a valid vendor/package name.
Am I affected?
You may be affected if you install packages from an untrusted third party repository, which does not sufficiently validate package names. Packagist.org and Private Packagist are safe, as they validate package names correctly.
Patched versions
Fixed in 2.2.29 and 2.10.2. Composer 1.x is also affected and you should move to a safe 2.x release.
Workarounds
Do not use untrusted package repositories. If you have to, mirror them through an internal repository like Private Packagist.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Composer-Paket | composer/composer | >= 2.3.0, < 2.10.2, >= 1.0.0, < 2.2.29 | 2.10.2, 2.2.29 |
Verweise
- https://github.com/composer/composer/security/advisories/GHSA-499r-g7pc-vmp9
- https://nvd.nist.gov/vuln/detail/CVE-2026-59948
- https://github.com/composer/composer/commit/502c6c4f699802d9cf464728b3e8a95674f919a0
- https://github.com/composer/composer/commit/c50b1efd13ebd73f6dca19b31424c5a02bf93cc1
- https://github.com/composer/composer
- https://github.com/composer/composer/releases/tag/2.10.2
- https://github.com/composer/composer/releases/tag/2.2.29
- CVSS-Vektor
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H- Schwäche (CWE)
CWE-22, CWE-787- Plattform
- Composer
- Paket
composer/composer- Veröffentlicht
- 20.07.2026
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-499r-g7pc-vmp9 - CC BY 4.0
Schwachstellenhistorie: composer/composer
Alle veröffentlichten Schwachstellen dieses Pakets (Composer-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 17
- Erste → letzte
- 04.2021 10.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 13
- Mittel 3
- Niedrig 1
Veröffentlichungen pro Jahr
- 2021: 2
- 2022: 1
- 2023: 2
- 2024: 3
- 2025: 1
- 2026: 8
-
Composer: Arbitrary file write outside vendor via malicious transitive package name dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.