CVE-2021-41116: Command injection in composer on Windows

Published Oct 5, 2021
·
Updated

Impact Windows users running Composer to install untrusted dependencies are affected and should definitely upgrade for safety. Other OSs and WSL are not affected.

Patches 1.10.23 and 2.1.9 fix the issue

Workarounds None

Other sources

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.

MITRE

Improper escaping of command arguments on Windows leading to command injection

Affected Software

6 affected componentsFixes available
composer/composer/composer>=2.0.0-alpha1, <2.1.9, <1.10.23
composer/composer/composer>=2.0.0-alpha1<2.1.9
2.1.9
composer/composer/composer<1.10.23
1.10.23
Getcomposer Composer<1.10.23
Getcomposer Composer>=2.0.0<2.1.9
Tenable Tenable.Sc<5.21.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/composer/composer to a version that resolves this vulnerability.

    Fixed in 2.1.9
  2. Upgrade

    Upgrade composer/composer/composer to a version that resolves this vulnerability.

    Fixed in 1.10.23
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.10.23
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.1.9

Event History

Oct 5, 2021
Advisory Published
07:39 AM
CVE Published
via MITRE·05:40 PM
Data Sourced
via MITRE·05:40 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-41116?

CVE-2021-41116 is a vulnerability in Composer, an open source dependency manager for the PHP language, that allows for command injection on Windows systems.

2

Who is affected by CVE-2021-41116?

Windows users running Composer to install untrusted dependencies are affected by CVE-2021-41116.

3

How severe is CVE-2021-41116?

CVE-2021-41116 has a severity rating of 9.8 (Critical).

4

How can I fix CVE-2021-41116?

To fix CVE-2021-41116, affected users should upgrade to a version of Composer that has the issue resolved (2.1.9 or later for versions 2.x, or 1.10.24 or later for versions 1.x).

5

Where can I find more information about CVE-2021-41116?

More information about CVE-2021-41116 can be found in the following references: [GitHub Security Advisory](https://github.com/composer/composer/security/advisories/GHSA-frqg-7g38-6gcf), [GitHub Commit](https://github.com/composer/composer/commit/ca5e2f8d505fd3bfac6f7c85b82f2740becbc0aa), and [Tenable Security Advisory](https://www.tenable.com/security/tns-2022-09).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203