{"id":"CVE-2024-41815","aliases":["GHSA-vx24-x4mv-vwr5","RUSTSEC-2024-0446"],"url":"https://o3.security/vulnerability/CVE-2024-41815","summary":"Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands","details":"## Description \nStarship 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.\n\n### PoC\nHave some custom command which prints out information from a potentially untrusted/unverified source.\n```\n[custom.git_commit_name]\ncommand = 'git show -s --format=\"%<(25,mtrunc)%s\"'\nstyle = \"italic\"\nwhen = true\n```\n\n### Impact\nThis 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.","published":"2024-07-26T21:01:48.605Z","modified":"2026-08-12T03:51:24.468280641Z","cvss":{"score":7.4,"severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"crates.io","name":"starship","fixedVersion":"1.20.0"}],"fix":{"url":"https://github.com/starship/starship/commit/cfc58161e0ec595db90af686ad77a73df6d44d74","label":"starship/starship@cfc5816"},"references":[{"type":"WEB","url":"https://github.com/starship/starship/releases/tag/v1.20.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/41xxx/CVE-2024-41815.json"},{"type":"ADVISORY","url":"https://github.com/starship/starship/security/advisories/GHSA-vx24-x4mv-vwr5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-41815"},{"type":"FIX","url":"https://github.com/starship/starship/commit/cfc58161e0ec595db90af686ad77a73df6d44d74"},{"type":"PACKAGE","url":"https://github.com/starship/starship"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2024-0446.html"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:24.468280641Z"}}