---
title: "CVE-2026-40176\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2026-40176?format=md
keywords: index, follow
---

# CVE-2026-40176

Publication date 15 April 2026

Last updated 14 May 2026

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**7.8 · High**

[Score breakdown](https://ubuntu.com/security/CVE-2026-40176?format=md#impact-score)

Toggle side navigation

## Description

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).

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| composer | 26.04 LTS resolute | Needs evaluation |
| 25.10 questing | Ignored end of life, was needs-triage |
| 24.04 LTS noble | Needs evaluation |
| 22.04 LTS jammy | Needs evaluation |
| 20.04 LTS focal | Needs evaluation |
| 18.04 LTS bionic | Needs evaluation |
| 16.04 LTS xenial | Needs evaluation |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

7.8 · High

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Local |
  | Attack complexity | Low |
  | Privileges required | None |
  | User interaction | Required |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | High |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 7.8 · High |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-40176)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-40176)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2026-40176)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2026-40176)

### Other references

* <https://www.cve.org/CVERecord?id=CVE-2026-40176>
* <https://github.com/composer/composer/security/advisories/GHSA-wg36-wvj6-r67p>
