CVE-2024-41815 Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands
Attackers can execute arbitrary commands via shell injection in custom commands within the Starship shell prompt, requiring specific user configurations.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-41815?
CVE-2024-41815 is a high-severity command injection vulnerability in starship, published on 26 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
Starship is a cross-shell prompt. Starting in version 1.0.0 and prior to version 1.20.0, undocumented and unpredictable shell expansion and/or quoting rules make it easily to accidentally cause shell injection when using custom commands with starship in bash. This issue only affects users with custom commands, so the scope is limited, and without knowledge of others' commands, it could be hard to successfully target someone. Version 1.20.0 fixes the vulnerability.
Which versions are affected by CVE-2024-41815?
3 open source packages ship an affected version, including starship. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
starship crates.io | From 1.0.0 | 1.20.0 |
starship crates.io | From 1.0.0 | 1.20.0 |
starship crates.io | From 1.0.1-0 | 1.20.0 |
Products include Starship Starship.
How do I fix CVE-2024-41815?
Upgrade starship to 1.20.0 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2024-41815 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-41815 exists.
Sources
Also known as GHSA-vx24-x4mv-vwr5, RUSTSEC-2024-0446.