Description
Composer is a dependency Manager for the PHP language. From 1.0 until 2.2.30 and 2.10.3, a malicious dependency package from a custom Composer repository or an untrusted composer.lock file could set source.type to perforce and source.url to an rsh: or jsh: P4PORT value. When the Perforce p4 client was installed and Composer installed the package from source through composer install or composer update, including --prefer-source, Composer\Util\Perforce passed the address to p4 without validation, causing p4 to run a local command with the privileges of the user or CI account. Packagist.org does not permit Perforce source metadata. This issue is fixed in versions 2.2.30 and 2.10.3.
Published: 2026-09-01
Score: 7.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Command Execution via Perforce source
Action: Upgrade Now
AI Analysis

Impact

Composer, the PHP dependency manager, has a flaw in versions 1.0 through 2.2.29 and 2.10.2 where an attacker who can supply a malicious package or modify composer.lock may set a Perforce source with an rsh: or jsh: P4PORT value. When the Perforce client is installed and Composer processes the source during install or update, the address is passed straight to the p4 command line without validation, causing p4 to execute a local command with the privileges of the user or continuous‑integration account. This results in arbitrary command execution, compromising confidentiality, integrity, and availability of the affected system. The issue is fixed in Composer versions 2.2.30 and 2.10.3.

Affected Systems

The vulnerability affects any installation of Composer 1.0 up to 2.2.29 and 2.10.2 that uses the Perforce source type. Systems running those Composer versions with a Perforce client installed and processing untrusted composer.json or composer.lock files are at risk. Packagist.org does not allow Perforce source metadata. This issue is fixed in versions 2.2.30 and 2.10.3.

Risk and Exploitability

The CVSS score is 7.7, indicating a moderate‑to‑high severity. EPSS is not available and the vulnerability is not listed in CISA KEV, suggesting no widespread exploitation has been observed yet. Attackers must supply a malicious package or tamper with the lockfile and rely on the target system having a Perforce client. After the attacker completes the install or update, p4 runs a locally supplied command with the effective user’s rights. This is an inferred local‑command‑execution vector that would require remote code manipulation of package metadata.

Generated by OpenCVE AI on September 2, 2026 at 03:33 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Composer to 2.2.30, 2.10.3, or later, which includes the fix for this issue.
  • If an upgrade is not possible, remove any Perforce source references from composer.json and composer.lock, or ensure that only trusted lockfiles are used during install.
  • Eliminate the Perforce client from the environment where Composer executes, so that even if a malicious source is processed, no unvalidated command can be launched.
  • As a temporary measure, avoid using the --prefer-source flag on untrusted or unverified repositories until the issue is resolved.

Generated by OpenCVE AI on September 2, 2026 at 03:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-rvx4-ffvw-m9q3 Composer arbitrary command execution via a malicious package's Perforce source URL
History

Thu, 03 Sep 2026 09:30:00 +0000

Type Values Removed Values Added
First Time appeared Getcomposer
Getcomposer composer
Vendors & Products Getcomposer
Getcomposer composer

Thu, 03 Sep 2026 05:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 02 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Important


Tue, 01 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
Description Composer is a dependency Manager for the PHP language. From 1.0 until 2.2.30 and 2.10.3, a malicious dependency package from a custom Composer repository or an untrusted composer.lock file could set source.type to perforce and source.url to an rsh: or jsh: P4PORT value. When the Perforce p4 client was installed and Composer installed the package from source through composer install or composer update, including --prefer-source, Composer\Util\Perforce passed the address to p4 without validation, causing p4 to run a local command with the privileges of the user or CI account. Packagist.org does not permit Perforce source metadata. This issue is fixed in versions 2.2.30 and 2.10.3.
Title Composer: Perforce source URL permits P4PORT `rsh:` command execution
Weaknesses CWE-78
References
Metrics cvssV4_0

{'score': 7.7, 'vector': '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'}


Subscriptions

Getcomposer Composer
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-03T03:56:08.149Z

Reserved: 2026-09-01T16:27:58.128Z

Link: CVE-2026-84361

cve-icon Vulnrichment

Updated: 2026-09-02T19:13:30.347Z

cve-icon NVD

Status : Deferred

Published: 2026-09-01T21:18:47.023

Modified: 2026-09-09T21:09:13.080

Link: CVE-2026-84361

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-01T20:06:48Z

Links: CVE-2026-84361 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-02T22:10:20Z

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')