CVE-2024-41815 — Vulnerability in starship — CVE Details
Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.59%). Schedule for your next planned update.
Does your project use an affected starship version?
Paste your Cargo.lock to check it for CVE-2024-41815 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.
Summary
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. Version 1.20.0 fixes the vulnerability.
PoC
Have some custom command which prints out information from a potentially untrusted/unverified source.
[custom.git_commit_name]
command = 'git show -s --format="%<(25,mtrunc)%s"'
style = "italic"
when = true
Impact
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.
Advisory Timeline
- First published July 26, 2024 (853 days ago).
- Last revised December 22, 2025 — 514 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p starship --precise 1.20.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| starship crates.io · Affected: All versions | 1.20.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-77
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.4 score means for each attack dimension.
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/starship/starship/security/advisories/GHSA-vx24-x4mv-vwr5WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-41815ADVISORY
- https://github.com/starship/starship/commit/cfc58161e0ec595db90af686ad77a73df6d44d74WEB
- https://github.com/starship/starshipPACKAGE
- https://github.com/starship/starship/releases/tag/v1.20.0WEB
- https://rustsec.org/advisories/RUSTSEC-2024-0446.htmlWEB
Frequently Asked Questions
- What is CVE-2024-41815?
- Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.4/10).
- How do I check if my project is affected by CVE-2024-41815?
- CVE-2024-41815 affects starship. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-41815 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 42.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-83816HIGH
CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE
- CVE-2026-83817HIGH
CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution