CVE-2026-84361: Composer Arbitrary Command Execution via Malicious Package's Perforce Source URL

composer/composer Updated 08 Sep 2026

Summary

08/09/2026
Yes i
High
7.7

CVE-2026-84361: Composer arbitrary command execution via a malicious package's Perforce source URL. Affects composer/composer across 2 version ranges.

>= 1.0, < 2.2.30 >= 2.3.0, < 2.10.3

Fixed in 2.2.30 or 2.10.3, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Composer is a widely used dependency manager for PHP, allowing developers to manage libraries and packages easily. It enables the installation, updating, and management of dependencies in PHP projects. However, Composer's integration with version control systems like Perforce can introduce vulnerabilities if not properly secured. This specific vulnerability arises from Composer's handling of Perforce source URLs, which can be exploited if the p4 command line client is installed on the user's machine.

Vulnerability Detail

The vulnerability allows an attacker to execute arbitrary commands on a system running Composer if the p4 Perforce CLI client is installed. This occurs when Composer processes a malicious package that contains a Perforce source URL. Composer does not validate these URLs adequately, allowing them to be crafted in a way that instructs the p4 client to run local commands instead of connecting to a server. This can lead to remote code execution with the privileges of the user or CI account running Composer, posing a significant security risk.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.0, < 2.2.30 2.2.30
    composer require composer/composer:2.2.30
  • >= 2.3.0, < 2.10.3 2.10.3
    composer require composer/composer:2.10.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading is not immediately possible, you can mitigate the risk by removing the p4 client from the PATH of machines running Composer that do not use Perforce. This will block the specific attack vector associated with this vulnerability. Additionally, restrict configured repositories to trusted sources and treat lock files from untrusted sources as untrusted input.

Conclusion

CVE-2026-84361 presents a significant risk for users of Composer who have the p4 client installed. It is crucial to update to the patched versions to mitigate this vulnerability. Users should also consider implementing workarounds to reduce their exposure until they can upgrade.

See every vulnerability recorded for composer/composer →

Share this vulnerability

FAQ

CVE-2026-84361 is a vulnerability in Composer that allows arbitrary command execution via malicious Perforce source URLs.

Users with the p4 Perforce CLI client installed and those relying on untrusted Composer repositories are at risk.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of this vulnerability is 7.7, indicating a high severity level.

As a temporary measure, remove the p4 client from the PATH and restrict your Composer repositories to trusted sources.

Related vulnerabilities

Recent vulnerabilities recorded for composer/composer.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.0, < 2.2.30 2.2.30
    composer require composer/composer:2.2.30
  • >= 2.3.0, < 2.10.3 2.10.3
    composer require composer/composer:2.10.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback