Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2024-41815
PublishedStarship 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.
- Source published
- 26 Jul 2024 21:01:48 UTC
- Source modified
- 2 Aug 2024 04:46:52 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · 7.4 CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
euvd · EUVD-2024-2428
PublishedStarship 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.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Jul 26, 2024, 9:01:48 PM
dateUpdated: Aug 2, 2024, 4:46:52 AM
- Source published
- Jul 26, 2024, 9:01:48 PM (timezone not stated)
- Source modified
- Aug 2, 2024, 4:46:52 AM (timezone not stated)
- Observed here
- 9 Nov 2026 01:04:12 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 3.1 · 7.4 CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd · CVE-2024-41815
PublishedStarship 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.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: CWE-77 · CWE-78
Original publisher date fields
published: 2024-07-26T21:15:14.370
lastModified: 2026-06-17T07:48:17.040
1 source CPE criteria · context only
- cpe:2.3:a:starship:starship:*:*:*:*:*:*:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 26 Jul 2024 21:15:14 UTC
- Source modified
- 17 Jun 2026 07:48:17 UTC
- Observed here
- 25 Oct 2026 00:17:22 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · [email protected] · Secondary · 7.4 CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1 · [email protected] · Primary · 7.0 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
osv · GHSA-vx24-x4mv-vwr5
Published## 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.
- Source published
- 26 Jul 2024 21:24:18 UTC
- Source modified
- 22 Dec 2025 16:44:26 UTC
- Observed here
- 24 Oct 2026 13:19:54 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Publisher rating · HIGH
osv · RUSTSEC-2024-0446
Published## Summary 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. ## Details I wanted to show the git commit name in my prompt (I use bash), so I added a command: ``` [custom.git_commit_name] command = 'git show -s --format="%<(25,mtrunc)%s"' style = "italic" when = true ``` To my surprise, when I had a commit with backticks in it, the backticks were expanded. e.g.: ``` touch foo git add foo git commit -m '`ls`' ``` Thankfully I noticed it on my own commit before checking out someone's code whose commit message was `rm -rf /important/stuff` The documentation says: Command output is printed unescaped to the prompt ``` Whatever output the command generates is printed unmodified in the prompt. This means if the output contains special sequences that are interpreted by your shell they will be expanded when displayed. These special sequences are shell specific, e.g. you can write a command module that writes bash sequences, e.g. \h, but this module will not work in a fish or zsh shell. Format strings can also contain shell specific prompt sequences, e.g. Bash, Zsh. ``` However, it doesn't specifically mention shell injection with $() and backticks; it just mentions the prompt escape sequences, and the link doesn't suggest any shell injection possibilities either. Furthermore, I can't even figure out how to properly escape things, because simply changing the command to ``` command = 'printf %q "$(git show -s --format="%<(25,mtrunc)%s")"' ``` doesn't work, as it's also adding a backslash before spaces. I also tried `use_stdin=false` I'm not 100% sure this qualifies as a vulnerability, but I feel it is not documented well enough to warn unsuspecting users, and it certainly is not documented how to properly quote things, because after 15-30 minutes of trying, I can't figure it out. I see some past commits about fixing shell injection with $, and it does seem like the problem doesn't exist in build-in modules like git branch. ## 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 People with custom commands, so the scope is limited, and without knowledge of people's commands, it could be hard to target people. The only one I saw in the example custom commands that may be vulnerable is the playerctl one.
- Source published
- 26 Jul 2024 12:00:00 UTC
- Source modified
- 12 Oct 2026 18:00:11 UTC
- Observed here
- 24 Oct 2026 13:19:54 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · OSV · upstream source license applies. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H