Skip to main content

CVE-2024-35241 — Vulnerability in composer/composer — CVE Details

HIGH

Composer has a command injection via malicious git branch name

Published June 10, 2024Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.49%). Schedule for your next planned update.

Does your project use an affected composer/composer version?

Paste your composer.lock to check it for CVE-2024-35241 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

Summary

Impact

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

2.2.24 for 2.2 LTS or 2.7.7 for mainline

Workarounds

Avoid installing dependencies via git by using --prefer-dist or the preferred-install: dist config setting.

Advisory Timeline

  • First published June 10, 2024 (899 days ago).
  • Last revised September 10, 2026 — 821 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update composer/composer to 2.7.7 or later
composer require "composer/composer:^2.7.7"
Composer
Update composer/composer to 2.2.24 or later
composer require "composer/composer:^2.2.24"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Packagist (1).

PackageFixed In
composer/composer Packagist · Affected: 2.3.0, 2.3.0-RC1, 2.3.0-RC2, 2.3.1 (+38 more)2.7.7
composer/composer Packagist · Affected: 2.0.0, 2.0.0-RC1, 2.0.0-RC2, 2.0.0-alpha1 (+56 more)2.2.24

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2024-35241?
Composer has a command injection via malicious git branch name. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2024-35241?
CVE-2024-35241 affects composer/composer. It has a 1.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-35241 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
1.49%
EPSS percentile: 74.3

This is an above-median EPSS score — 74.3% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-47f6-5gq3-vx9c
BIT-composer-2024-35241

Related CVEs

  • CVE-2026-103035
    HIGH

    TeamPass folder re-parenting authorization bypass

  • CVE-2026-40261
    HIGH

    Composer has a command injection via malicious perforce reference

  • CVE-2026-110782
    HIGH

    SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)

  • CVE-2026-84361
    HIGH

    Composer arbitrary command execution via a malicious package's Perforce source URL

  • CVE-2024-35242
    HIGH

    Composer has multiple command injections via malicious git/hg branch names

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock