Skip to main content

CVE-2026-84361 — Vulnerability in composer/composer — CVE Details

HIGH

Composer arbitrary command execution via a malicious package's Perforce source URL

Published September 8, 2026Updated September 8, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.55%). Schedule for your next planned update.

Does your project use an affected composer/composer version?

Paste your composer.lock to check it for CVE-2026-84361 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

Summary

Summary

If the p4 Perforce CLI client is installed, a malicious dependency package from a package repository allowing arbitrary perforce source URLs (packagist.org is safe) could execute arbitrary commands when running composer install or composer update. Composer passed a package's Perforce source address to the p4 CLI client without validating it. The p4 CLI client accepts addresses that mean "run this local command" instead of "connect to this server". This is remote code execution with the privileges of the user or CI account running Composer.

Am I affected?

You are only affected if all of the following are true:

  • The Perforce p4 command line client is installed and on the PATH of the machine running Composer.
  • An attacker can control a package metadata's source section with a perforce type. Packagist.org does not allow perforce source metadata, so you are only exploitable if you rely on another Composer repository (any custom composer-type repository, or an inline package repository entry), or a composer.lock file you obtained from somewhere you do not trust.
  • The package gets installed from source, either because it has no dist artifact or because source installs are selected (for example --prefer-source).

Plainly not affected: anyone without the p4 client installed, which is the large majority of Composer users. Perforce is an optional VCS integration. Also not affected: projects that only consume packages from Packagist.org, which does not allow Perforce source repositories and therefore cannot serve a package with a Perforce source address.

Most realistic way to get hit: a developer workstation or CI image that has Perforce tooling installed, pulling packages from a private or third party Composer repository that an attacker has compromised.

Patched versions

Composer now validates Perforce source addresses before handing them to the p4 client, and accepts only real network endpoints (an optional tcp/ssl transport with a host and port). Addresses that make the client spawn a local process are rejected, and the package fails validation on both update and install, before any p4 command runs. Fixed in Composer 2.10.3 and 2.2.30.

Note: If you legitimately use Perforce with an unusual P4PORT value that is not a plain host and port, Composer will now reject it.

Workarounds

Upgrading is the only complete fix.

Risk reduction short of upgrading:

  • Remove the p4 client from the PATH of machines that run Composer but do not use Perforce. This fully blocks this specific attack, since the vulnerability depends on that client being present.
  • Restrict configured repositories to sources you control or trust, and treat lock files from untrusted sources as untrusted input.

Advisory Timeline

  • First published September 8, 2026 (79 days ago).
  • Last revised September 8, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update composer/composer to 2.2.30 or later
composer require "composer/composer:^2.2.30"
Composer
Update composer/composer to 2.10.3 or later
composer require "composer/composer:^2.10.3"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Packagist (1).

PackageFixed In
composer/composer Packagist · Affected: 1.0.0, 1.0.0-alpha1, 1.0.0-alpha10, 1.0.0-alpha11 (+159 more)2.2.30
composer/composer Packagist · Affected: 2.10.0, 2.10.0-RC1, 2.10.0-RC2, 2.10.1 (+67 more)2.10.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-78
    OS Command InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.4 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-84361?
Composer arbitrary command execution via a malicious package's Perforce source URL. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.4/10).
How do I check if my project is affected by CVE-2026-84361?
CVE-2026-84361 affects composer/composer. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-84361 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.4

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.55%
EPSS percentile: 39.4

This is a below-median EPSS score — only 39.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-rvx4-ffvw-m9q3
BIT-composer-2026-84361

Related CVEs

  • CVE-2024-35241
    HIGH

    Composer has a command injection via malicious git branch name

  • CVE-2026-103035
    HIGH

    TeamPass folder re-parenting authorization bypass

  • CVE-2026-40261
    HIGH

    Composer has a command injection via malicious perforce reference

  • CVE-2026-110782
    HIGH

    SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)

  • CVE-2024-35242
    HIGH

    Composer has multiple command injections via malicious git/hg branch names

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock