Code execution via unescaped Git branch names
Published Jun 10, 2024 · Updated Apr 21, 2025
Command injection in Composer 2.0 through 2.2.23 and 2.3 through 2.7.6 allows remote attackers to execute code via crafted Git branch names. GitDownloader::getUnpushedChanges interpolates unescaped remote and local branch names into a shell command used by status, reinstall, and remove. Exploitation requires a source-installed Git dependency with an attacker-controlled branch name and user interaction to run an affected command.
Summary
What happened
Command injection in Composer 2.0 through 2.2.23 and 2.3 through 2.7.6 allows remote attackers to execute code via crafted Git branch names. GitDownloader::getUnpushedChanges interpolates unescaped remote and local branch names into a shell command used by status, reinstall, and remove. Exploitation requires a source-installed Git dependency with an attacker-controlled branch name and user interaction to run an affected command.
The record
- CVE
- CVE-2024-35241
- Published
- Jun 10, 2024
- Updated
- Apr 21, 2025
- Vendor
- Fedora Project
- Product
- Fedora Linux
- Classifications
- CWE-77, T1059, T1195.001
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jun 10, 2024CVE publishedPublication date reported by the CVE source.
- Apr 21, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=39
- Affected versionversion=40
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo