8.8
HIGH CVSS 3.1
CVE-2024-24821
"PHP Composer Arbitrary File Inclusion"
Description

Composer is a dependency Manager for the PHP language. In affected versions several files within the local working directory are included during the invocation of Composer and in the context of the executing user. As such, under certain conditions arbitrary code execution may lead to local privilege escalation, provide lateral user movement or malicious code execution when Composer is invoked within a directory with tampered files. All Composer CLI commands are affected, including composer.phar's self-update. The following scenarios are of high risk: Composer being run with sudo, Pipelines which may execute Composer on untrusted projects, Shared environments with developers who run Composer individually on the same project. This vulnerability has been addressed in versions 2.7.0 and 2.2.23. It is advised that the patched versions are applied at the earliest convenience. Where not possible, the following should be addressed: Remove all sudo composer privileges for all users to mitigate root privilege escalation, and avoid running Composer within an untrusted directory, or if needed, verify that the contents of `vendor/composer/InstalledVersions.php` and `vendor/composer/installed.php` do not include untrusted code. A reset can also be done on these files by the following:```sh rm vendor/composer/installed.php vendor/composer/InstalledVersions.php composer install --no-scripts --no-plugins ```

INFO

Published Date :

Feb. 9, 2024, 12:15 a.m.

Last Modified :

Nov. 21, 2024, 8:59 a.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2024-24821 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Getcomposer composer
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH [email protected]
CVSS 3.1 HIGH [email protected]
Solution
Update Composer to remediate an arbitrary file inclusion vulnerability.
  • Update the Composer package to a patched version.
  • Remove sudo privileges for Composer users.
  • Avoid running Composer in untrusted directories.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2024-24821.

URL Resource
https://github.com/composer/composer/commit/64e4eb356b159a30c766cd1ea83450a38dc23bf5 Patch
https://github.com/composer/composer/security/advisories/GHSA-7c6p-848j-wh5h Third Party Advisory
https://github.com/composer/composer/commit/64e4eb356b159a30c766cd1ea83450a38dc23bf5 Patch
https://github.com/composer/composer/security/advisories/GHSA-7c6p-848j-wh5h Third Party Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-24821 is associated with the following CWEs:

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-24821 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-24821 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/composer/composer/commit/64e4eb356b159a30c766cd1ea83450a38dc23bf5
    Added Reference https://github.com/composer/composer/security/advisories/GHSA-7c6p-848j-wh5h
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Feb. 16, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/composer/composer/commit/64e4eb356b159a30c766cd1ea83450a38dc23bf5 No Types Assigned https://github.com/composer/composer/commit/64e4eb356b159a30c766cd1ea83450a38dc23bf5 Patch
    Changed Reference Type https://github.com/composer/composer/security/advisories/GHSA-7c6p-848j-wh5h No Types Assigned https://github.com/composer/composer/security/advisories/GHSA-7c6p-848j-wh5h Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* versions from (including) 2.0.0 up to (excluding) 2.2.23 *cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* versions from (including) 2.3.0 up to (excluding) 2.7.0
  • CVE Received by [email protected]

    Feb. 09, 2024

    Action Type Old Value New Value
    Added Description Composer is a dependency Manager for the PHP language. In affected versions several files within the local working directory are included during the invocation of Composer and in the context of the executing user. As such, under certain conditions arbitrary code execution may lead to local privilege escalation, provide lateral user movement or malicious code execution when Composer is invoked within a directory with tampered files. All Composer CLI commands are affected, including composer.phar's self-update. The following scenarios are of high risk: Composer being run with sudo, Pipelines which may execute Composer on untrusted projects, Shared environments with developers who run Composer individually on the same project. This vulnerability has been addressed in versions 2.7.0 and 2.2.23. It is advised that the patched versions are applied at the earliest convenience. Where not possible, the following should be addressed: Remove all sudo composer privileges for all users to mitigate root privilege escalation, and avoid running Composer within an untrusted directory, or if needed, verify that the contents of `vendor/composer/InstalledVersions.php` and `vendor/composer/installed.php` do not include untrusted code. A reset can also be done on these files by the following:```sh rm vendor/composer/installed.php vendor/composer/InstalledVersions.php composer install --no-scripts --no-plugins ```
    Added Reference GitHub, Inc. https://github.com/composer/composer/security/advisories/GHSA-7c6p-848j-wh5h [No types assigned]
    Added Reference GitHub, Inc. https://github.com/composer/composer/commit/64e4eb356b159a30c766cd1ea83450a38dc23bf5 [No types assigned]
    Added CWE GitHub, Inc. CWE-829
    Added CVSS V3.1 GitHub, Inc. AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 8.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.09 }} -0.02%

score

0.26596

percentile