getcomposer composer CVE-2022-24828 vulnerability in Getcomposer and Other Products
Published on April 13, 2022

Missing input validation can lead to command execution in composer

product logo product logo product logo product logo
Composer is a dependency manager for the PHP programming language. Integrators using Composer code to call `VcsDriver::getFileContent` can have a code injection vulnerability if the user can control the `$file` or `$identifier` argument. This leads to a vulnerability on packagist.org for example where the composer.json's `readme` field can be used as a vector for injecting parameters into hg/Mercurial via the `$file` argument, or git via the `$identifier` argument if you allow arbitrary data there (Packagist does not, but maybe other integrators do). Composer itself should not be affected by the vulnerability as it does not call `getFileContent` with arbitrary data into `$file`/`$identifier`. To the best of our knowledge this was not abused, and the vulnerability has been patched on packagist.org and Private Packagist within a day of the vulnerability report.

Github Repository Vendor Advisory Vendor Advisory Vendor Advisory NVD

Vulnerability Analysis

CVE-2022-24828 is exploitable with network access, requires user interaction. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to be very high.

Attack Vector:
NETWORK
Attack Complexity:
HIGH
Privileges Required:
NONE
User Interaction:
REQUIRED
Scope:
CHANGED
Confidentiality Impact:
HIGH
Integrity Impact:
HIGH
Availability Impact:
HIGH

Weakness Type

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.


Products Associated with CVE-2022-24828

You can be notified by email with stack.watch whenever vulnerabilities like CVE-2022-24828 are published in these products:

 
 
 
 

Affected Versions

composer:

Vulnerable Packages

The following package name and versions may be associated with CVE-2022-24828

Package Manager Vulnerable Package Versions Fixed In
composer composer/composer < 1.10.26 1.10.26
composer composer/composer >= 2.0, < 2.2.12 2.2.12
composer composer/composer >= 2.3.0, < 2.3.5 2.3.5

Exploit Probability

EPSS
0.27%
Percentile
49.97%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.