Remote Code Execution via web-accessible composer.phar (composer composer)
At a glance
- Source
- NVD
- EPSS
- EPSS 1.53 % · percentile 75 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
Description
Composer is a dependency manager for PHP. Users publishing a composer.phar to a public web-accessible server where the composer.phar can be executed as a php file may be subject to a remote code execution vulnerability if PHP also has `register_argc_argv` enabled in php.ini. Versions 2.6.4, 2.2.22 and 1.10.27 patch this vulnerability. Users are advised to upgrade. Users unable to upgrade should make sure `register_argc_argv` is disabled in php.ini, and avoid publishing composer.phar to the web as this is not best practice.
Weaknesses (CWE)
- CWE-74 — Improper Neutralization of Special Elements in Output Used by a Downstream Component
References
- https://github.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hf
- https://github.com/composer/composer/commit/4fce14795aba98e40b6c4f5047305aba17a6120d
- https://github.com/composer/composer/commit/955a48e6319c8962e5cd421b07c00ab3c728968c
- https://github.com/composer/composer/commit/95e091c921037b7b6564942845e7b738f6b95c9c
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFOPGPW2KS37O3KJWBRGTUWHTXCQXBS2/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7AWYAUZNH565NWPIKGEIYBWHYNM5JGAE/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/66H2WKFUO255T3BZTL72TNYJYH2XM5FG/
- https://lists.debian.org/debian-lts-announce/2024/03/msg00030.html
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 6.4 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H | GitHub_M |
| CVSS 3.1 | MEDIUM 6.4 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-jm6m-4632-36hf — Composer Remote Code Execution vulnerability via web-accessible composer.phar
European references
- ENISA EUVD · EUVD-2023-2538
- GCVE · GCVE-0-2023-43655
CERT-FR advisories
- CERTFR-2023-AVI-0966 — Multiples vulnérabilités dans Tenable Security Center · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*< 1.10.27cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*≥ 2.0.0 < 2.2.21cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*≥ 2.3.0 < 2.6.4cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*
Affected products
| Product | Versions |
|---|---|
| composer · composer | affected 2.6.4, 2.2.21, 1.10.27 ; affected >= 2.0, < 2.2.22 ; affected < 1.10.27 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |