CVE-2026-40176
highPriorität · verfolgen · 10EPSS 0.010 · 64. PerzentilExploit · PoCDEEURUUSEPSS · bewertet 2026-10-27
Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::generateP4Command() method, which constructs shell commands by interpolating user-supplied Perforce connection parameters (port, user, client) without proper escaping. An attacker can inject arbitrary commands through these values in a malicious composer.json declaring a Perforce VCS repository, leading to command execution in the context of the user running Composer, even if Perforce is not installed. VCS repositories are only loaded from the root composer.json or the composer config directory, so this cannot be exploited through composer.json files of packages installed as dependencies. Users are at risk if they run Composer commands on untrusted projects with attacker-supplied composer.json files. This issue has been fixed in Composer 2.2.27 (2.2 LTS) and 2.9.6 (mainline).
cvss
Technischer Schweregrad, 0–10. Eine Zeile je Quelle.
Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen
SSVC
Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.
schwächen
Die CWE-Schwächeklassen, zu denen dies gehört.
Exploits (3)
Öffentlicher Proof-of-Concept- und Exploit-Code.
- Saku0512/CVE-2026-40176-pocSaku0512/CVE-2026-40176-pocPoC · poc_in_github
- ikarolaborda/CVE-2026-40176ikarolaborda/CVE-2026-40176PoC · poc_in_github
betroffene Produkte (17)
Betroffene Produkte und Versionsbereiche.
Advisories (3)
Hersteller- und Ökosystem-Meldungen dazu.
- WID-SEC-W-2026-1128Composer: Mehrere Schwachstellen ermöglichen CodeausführungDeutsch2026-04-14csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in Composer ausnutzen, um beliebigen Programmcode auszuführen.
- GHSA-wg36-wvj6-r67pComposer has a command injection via malicious perforce repository2026-04-14ghsa · osvUS
### Impact The `Perforce::generateP4Command()` method constructed shell commands by interpolating user-supplied Perforce connection parameters (port, user, client) without proper escaping. An attacker controlling a repository configuration in a malicious composer.json declaring a Perforce VCS repository could inject arbitrary commands through these values, leading to command execution in the context of the user running Composer. Composer would execute these injected commands even if Perforce is not installed. VCS repositories are only loaded from the root composer.json file located in the directory you execute Composer commands in and from the composer config directory (e.g. `~/.config/composer/composer.json`). So this vulnerability cannot be exploited through composer.json files of packages installed as dependencies. You are at risk of command execution if you run Composer commands on untrusted projects with attacker supplied composer.json files, regardless of whether you or any of your dependencies use Perforce. ### Patches Fixed in Composer 2.2.27 (2.2 LTS) and 2.9.6 (mainline) ### Workarounds - Carefully inspect composer.json files before running Composer on them. Verify that Perforce-related fields contain valid values. - Only run Composer commands on projects from trusted sources.
- BIT-composer-2026-40176Composer is vulnerable to Command Injection via Malicious Perforce Repository2026-04-18vendor · osvUS
Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::generateP4Command() method, which constructs shell commands by interpolating user-supplied Perforce connection parameters (port, user, client) without proper escaping. An attacker can inject arbitrary commands through these values in a malicious composer.json declaring a Perforce VCS repository, leading to command execution in the context of the user running Composer, even if Perforce is not installed. VCS repositories are only loaded from the root composer.json or the composer config directory, so this cannot be exploited through composer.json files of packages installed as dependencies. Users are at risk if they run Composer commands on untrusted projects with attacker-supplied composer.json files. This issue has been fixed in Composer 2.2.27 (2.2 LTS) and 2.9.6 (mainline).
auch bekannt als (6)
Weitere Namen und Kennungen dieser Entität.
quellen
Welche Quellen diesen Datensatz belegen und wann.
Referenzen (11)
Externe Belege — Patches, Meldungen, Analysen.
- https://access.redhat.com/security/cve/cve-2026-40176cnnvd
- https://github.com/composer/composer/releasesPatchcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2026-40176cnnvd
- https://github.com/composer/composer/releases/tag/2.9.6enisa_euvd
- https://github.com/composer/composer/security/advisories/GHSA-wg36-wvj6-r67penisa_euvd
- https://access.redhat.com/errata/RHSA-2026:8165nvd
- https://access.redhat.com/security/cve/CVE-2026-40176nvd
- https://bugzilla.redhat.com/show_bug.cgi?id=2458828nvd
Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.
Kostenloser Scan