Intel

AIKIDO-2026-247566

composer/composer is vulnerable to OS Command Injection

OS Command InjectionGHSA-rvx4-ffvw-m9q3 Published 2 days ago

77

High Risk

This Affects:

PHPcomposer/composer
1.0.0 - 2.2.29
Fixed in 2.2.30
2.3.0 - 2.10.2
Fixed in 2.10.3
Are you affected? Scan for Free

TL;DR

Composer can resolve a package's source through the Perforce p4 command-line client. It does not validate that a Perforce source URL points to a network endpoint before handing it to p4, and the client treats certain address forms as directives to spawn a local helper process such as rsh. A package hosted in a non-Packagist repository can supply a crafted Perforce URL so that arbitrary commands run on the machine performing a source install. The fix restricts Perforce source URLs to network endpoints so they can no longer trigger local command execution.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you install a package whose source is served from an untrusted Perforce repository.

Background info

composer/composer is vulnerable to OS Command Injection in versions 1.0.0 - 2.2.29 and 2.3.0 - 2.10.2.

How to fix this

Upgrade the composer/composer library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform