Skip to main content

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

CVE-2024-35241

Severity High
Score 8.8/10

Summary

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 'status', 'reinstall', and 'remove' commands with packages installed from source via git containing specially crafted branch names in the repository can be used to execute code. As a workaround, avoid installing dependencies via git by using '--prefer-dist' or the 'preferred-install: dist' config setting.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • REQUIRED
  • 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