Advisory

DEBIAN-CVE-2026-40176

Also known as: CVE-2026-40176

Summary

The record has no summary.

Details

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

Severity

High Basis: CVSS v3 score 7.8, vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Dates

Published
2026-04-15 21:17 UTC
Modified
2026-11-03 09:47 UTC

Affected packages and fixes

composer

Debian packages (deb) · Debian 12

Affected

  • introduced 0, fixed 2.5.5-1+deb12u4 (ecosystem)

Fixed versions

2.5.5-1+deb12u4

Fix

  • Fixed version 2.5.5-1+deb12u4
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

composer

Debian packages (deb) · Debian 13

Affected

  • introduced 0, fixed 2.8.8-1+deb13u2 (ecosystem)

Fixed versions

2.8.8-1+deb13u2

Fix

  • Fixed version 2.8.8-1+deb13u2
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

composer

Debian packages (deb) · Debian 14

Affected

  • introduced 0, fixed 2.9.7-1 (ecosystem)

Fixed versions

2.9.7-1

Fix

  • Fixed version 2.9.7-1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Debian Security Tracker (converted by OSV.dev)

Debian Security Tracker, converted to OSV by OSV.dev.

Sources & licences