CVE-2021-41116 json
Command injection in composer on Windows
published 5y ago modified 2mo ago also BIT-composer-2021-41116 , EUVD-2021-2198 , GHSA-frqg-7g38-6gcf
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.8%
- EPSS 2.8% chance of exploitation in 30 days, percentile 86%
- public exploits
- 0
- none known
Summary
Composer is an open source dependency manager for the PHP language. In affected versions windows users running Composer to install untrusted dependencies are subject to command injection and should upgrade their composer version. Other OSs and WSL are not affected. The issue has been resolved in composer versions 1.10.23 and 2.1.9. There are no workarounds for this issue.
Patch / fix
- packagist composer/composer 1.10.23, 2.1.9
- bitnami composer 1.10.23, 2.1.9
- getcomposer composer 1.10.23, 2.1.9
- tenable tenable.sc 5.21.0
- php-composer2 openSUSE Tumbleweed 2.1.12-1.1
- php-composer openSUSE Tumbleweed 1.10.25-1.1
- php-composer Package Hub 15 SP3, openSUSE Leap 15.3 1.10.26-bp153.2.6.1
opensuse advisories openSUSE-SU-2024:11617-1openSUSE-SU-2024:11874-1openSUSE-SU-2022:0132-1
- composer Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 2.1.9-r0
alpine advisories ALPINE-CVE-2021-41116
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Is CVE-2021-41116 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
2.83% chance of exploitation in the next 30 days, higher than 86% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | composer/composer | <1.10.23 >=2.0.0-alpha1, <2.1.9 |
1.10.23 2.1.9 |
| bitnami | composer | <1.10.23 >=2.0.0, <2.1.9 |
1.10.23 2.1.9 |
Affected products
- composer composer
Classification
- Weakness
-
- CWE-77 Improper Neutralization of Special Elements used in a Command
References
-
github.com
/composer/composer/commit/ca5e2f8d505fd3bfac6f7c85b82f2740becbc0aa
web, patch, third-party-advisory, advisory
-
github.com
/composer/composer/security/advisories/GHSA-frqg-7g38-6gcf
web, third-party-advisory, advisory
-
sonarsource.com
/blog/securing-developer-tools-package-managers/
web
-
nvd.nist.gov
/vuln/detail/CVE-2021-41116
advisory, web
-
github.com
/FriendsOfPHP/security-advisories/blob/master/composer/composer/CVE-2021-41116.yaml
web
-
github.com
/composer/composer
package
-
sonarsource.com
/blog/securing-developer-tools-package-managers
web
-
tenable.com
/security/tns-2022-09
web
Sources
- CVE List CVE-2021-41116
- GitHub Advisory GHSA-frqg-7g38-6gcf
- NVD CVE-2021-41116
- OSV BIT-composer-2021-41116
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.