What’s Vulnerable › Vulnerabilities
CVE-2024-41815: Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands
- Severity: high (CVSS 7.0 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-07-26 · updated 2026-06-17
- Weakness: CWE-77
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.
Affected products
- starship: from 1.0.0 before 1.20.0 — fixed in 1.20.0
How to fix
Upgrade to a fixed version: starship 1.20.0. Check the vendor advisory for mitigations.
References
- https://github.com/starship/starship/commit/cfc58161e0ec595db90af686ad77a73df6d44d74
- https://github.com/starship/starship/releases/tag/v1.20.0
- https://github.com/starship/starship/security/advisories/GHSA-vx24-x4mv-vwr5
- https://github.com/starship/starship/commit/cfc58161e0ec595db90af686ad77a73df6d44d74
- https://github.com/starship/starship/releases/tag/v1.20.0
- https://github.com/starship/starship/security/advisories/GHSA-vx24-x4mv-vwr5
Get alerted when CVE-2024-41815 or the next vulnerability affects your stack