Skip to main content

Improper Neutralization of Special Elements used in a Command ('Command Injection')


Severity High
Score 8.8/10


Composer is a dependency manager for PHP. In the affected package composer/composer versions 2.0.0-alpha1 through 2.2.23, and 2.3.0-RC1 through 2.7.6, the "composer install" command running inside a "git/hg" repository which has specially crafted branch names can lead to command injection. This requires cloning untrusted repositories. As a workaround, avoid cloning potentially compromised repositories.

  • LOW
  • HIGH
  • NONE
  • HIGH
  • HIGH

CWE-77 - Command Injection

A command injection attack involves injecting an operating system command through the data input, which gets executed on the host operating system with the privileges of the victimized application. The impact of a command injection attack may range from loss of data confidentiality and integrity to unauthorized remote access to the hosting system. The attack may cause serious data breaches and system takeover.

Advisory Timeline

  • Published