GitHub Advisoryadvisory · crates.io

GHSA-vx24-x4mv-vwr5 Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands

HIGH Published 2024-07-26 Modified 2025-12-22 Official page ↗
Aliases
CVE-2024-41815
Ecosystem
crates.io
Packages
starship
Severity
High
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-77, CWE-78
Reviewed
2024-07-26

Affected packages

• crates.io starship: >= 1.0.0, < 1.20.0 → fixed in 1.20.0

Description

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.

Related

Alias · CVE (1)

Weakness · CWE (2)

  • CWE-77 Improper Neutralization of Special Elements used in a Command weakness
  • CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness

References