CVE-2021-41116
CRITICAL 9.8CVSS 3.1Improper escaping of command arguments on Windows leading to command injection
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.
- Published
- 5 Oct 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-77
- Also known as
- BIT-composer-2021-41116GHSA-frqg-7g38-6gcf
- Sources
- NVDJSONOSV GHSA-frqg-7g38-6gcfJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | getcomposer | composercpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* |
< 1.10.23 | 1.10.23 |
| NVD | getcomposer | composercpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* |
>= 2.0.0, < 2.1.9 | 2.1.9 |
| NVD | tenable | tenable.sccpe:2.3:a:tenable:tenable.sc:*:*:*:*:*:*:*:* |
< 5.21.0 | 5.21.0 |
| OSV | Packagist | composer/composer | < 1.10.23 | 1.10.23 |
| OSV | Packagist | composer/composer | >= 2.0.0-alpha1, < 2.1.9 | 2.1.9 |
References
- https://github.com/composer/composer/commit/ca5e2f8d505fd3bfac6f7c85b82f2740becbc0aa · Patch, Third Party Advisory, WEB
- https://github.com/composer/composer/security/advisories/GHSA-frqg-7g38-6gcf · Third Party Advisory, WEB
- https://www.sonarsource.com/blog/securing-developer-tools-package-managers/ · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-41116 · ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/composer/composer/CVE-2021-41116.yaml · WEB
- https://github.com/composer/composer · PACKAGE
- https://www.tenable.com/security/tns-2022-09 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 5 Oct 2021)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 5 Oct 2021)