VDB
Sign up
HIGH8.8

GHSA-jm6m-4632-36hf

Composer Remote Code Execution vulnerability via web-accessible composer.phar

Quick fix

GHSA-jm6m-4632-36hf — composer/composer: upgrade to the fixed version with the command below.

composer require composer/composer:^1.10.27

Details

### Impact

Users publishing a composer.phar to a public web-accessible server where the composer.phar can be executed as a php file may be impacted if PHP also has `register_argc_argv` enabled in php.ini.

### Patches

2.6.4, 2.2.22 and 1.10.27 patch this vulnerability.

### Workarounds

Make sure `register_argc_argv` is disabled in php.ini, and avoid publishing composer.phar to the web as this really should not happen.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/composer/composer
Introduced in: 0Fixed in: 1.10.27
Fixcomposer require composer/composer:^1.10.27
Packagist/composer/composer
Introduced in: 2.0.0Fixed in: 2.2.22
Fixcomposer require composer/composer:^2.2.22
Packagist/composer/composer
Introduced in: 2.3.0Fixed in: 2.6.4
Fixcomposer require composer/composer:^2.6.4

References