{"id":"GHSA-vx24-x4mv-vwr5","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=\"%\u003c(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.","aliases":["CVE-2024-41815","RUSTSEC-2024-0446"],"modified":"2025-12-22T16:44:26.461289Z","published":"2024-07-26T21:24:18Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2024-07-26T21:24:18Z","nvd_published_at":"2024-07-26T21:15:14Z","cwe_ids":["CWE-77","CWE-78"]},"references":[{"type":"WEB","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":"WEB","url":"https://github.com/starship/starship/commit/cfc58161e0ec595db90af686ad77a73df6d44d74"},{"type":"PACKAGE","url":"https://github.com/starship/starship"},{"type":"WEB","url":"https://github.com/starship/starship/releases/tag/v1.20.0"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2024-0446.html"}],"affected":[{"package":{"name":"starship","ecosystem":"crates.io","purl":"pkg:cargo/starship"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.0.0"},{"fixed":"1.20.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/07/GHSA-vx24-x4mv-vwr5/GHSA-vx24-x4mv-vwr5.json","last_known_affected_version_range":"\u003c= 1.19.0"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}