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 :
Feb. 16, 2024, 9:37 p.m.
Source :
[email protected]
Remotely Exploitable :
No
Impact Score :
6.0
Exploitability Score :
2.0
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 |
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 [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
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:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-24821
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.04 }} 0.00%
score
0.06680
percentile