Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. composer/composer
  4. ›
  5. CVE-2024-35241

CVE-2024-35241: Composer has a command injection via malicious git branch name

June 10, 2024 (updated April 23, 2025)

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.

References

  • github.com/advisories/GHSA-47f6-5gq3-vx9c
  • github.com/composer/composer
  • github.com/composer/composer/commit/b93fc6ca437da35ae73d667d0618749c763b67d4
  • github.com/composer/composer/commit/ee28354ca8d33c15949ad7de2ce6656ba3f68704
  • github.com/composer/composer/security/advisories/GHSA-47f6-5gq3-vx9c
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC
  • nvd.nist.gov/vuln/detail/CVE-2024-35241
  • www.vicarius.io/vsociety/posts/cve-2024-35241-detect-composer-vulnerability
  • www.vicarius.io/vsociety/posts/cve-2024-35241-mitigate-vulnerable-composer

Code Behaviors & Features

Detect and mitigate CVE-2024-35241 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.0 before 2.2.24, all versions starting from 2.3 before 2.7.7

Fixed versions

  • 2.2.24
  • 2.7.7

Solution

Upgrade to versions 2.2.24, 2.7.7 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Source file

packagist/composer/composer/CVE-2024-35241.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:40 +0000.