SecurityContext

CVE-2024-35241: Composer - Remote Code Execution

  • Cve: CVE-2024-35241
  • Name: Composer - Remote Code Execution
  • Description: Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, 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. Patches for this issue are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid installing dependencies via git by using `--prefer-dist` or the `preferred-install: dist` config setting.
  • Impact: Attackers can execute arbitrary code on the system by exploiting crafted branch names in git repositories during package management operations.
  • Remediation: Update to version 2.2.24 or 2.7.7, or avoid installing dependencies via git by using `--prefer-dist` or setting `preferred-install: dist`.
  • Vulnerability type: command_injection
  • Vulnerability impact: remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Epss score: 0.0105
  • Epss percentile: 0.65109
  • Assignee: [email protected]
  • Published at: 2024-06-10T22:15:09Z
  • Age in days: 897
  • Modified at: 2026-06-17T07:34:36Z
  • Patch available: yes
  • References total: 7
  • Products total: 2
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-35241
  • Nvd status: deferred
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-77Improper Neutralization of Special Elements used in a Command

References

Same in every row:

  • Source: nvd
  • Tags:
Url
https://github.com/composer/composer/commit/b93fc6ca437da35ae73d667d0618749c763b67d4
https://github.com/composer/composer/commit/ee28354ca8d33c15949ad7de2ce6656ba3f68704
https://github.com/composer/composer/security/advisories/GHSA-47f6-5gq3-vx9c
https://lists.fedoraproject.org/archives/list/[email protected]/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC/
https://lists.fedoraproject.org/archives/list/[email protected]/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC/
https://www.vicarius.io/vsociety/posts/cve-2024-35241-detect-composer-vulnerability
https://www.vicarius.io/vsociety/posts/cve-2024-35241-mitigate-vulnerable-composer

Products

ProductAffectedPlatform boundSourcesUrl
getcomposer:composer>= 2.3, < 2.7.7; = 2.3; >= 2.0, < 2.2.24; = 2.0noadp_cpes, cna_alias_text/v1/products/getcomposer/composer
fedoraproject:fedora= 40, = 39noadp_cpes/v1/products/fedoraproject/fedora

Projects

RepositoryLink kindsIndexedUrl
composer/composercommit, fix, package, security_advisoryyes/v1/repositories/composer/composer

Index

  • Repositories: 3
  • Repositories high signal: 2
  • Packages: 1

Exploitation

  • Remote: yes
  • Exposed hosts: 49161
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports