Improper Neutralization of Special Elements used in a Command ('Command Injection') Affecting starship package, versions >=1.0.0 <1.20.0


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Neutralization of Special Elements used in a Command ('Command Injection') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-STARSHIP-7572535
  • published28 Jul 2024
  • disclosed26 Jul 2024
  • creditEvan Leif Battaglia

Introduced: 26 Jul 2024

CVE-2024-41815  (opens in a new tab)
CWE-77  (opens in a new tab)

How to fix?

Upgrade starship to version 1.20.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements used in a Command ('Command Injection') via undocumented and unpredictable shell expansion in custom commands.

Note: This is only exploitable if custom commands are used.

PoC

[custom.git_commit_name] command = 'git show -s --format="%<(25,mtrunc)%s"' style = "italic" when = true

References

CVSS Scores

version 4.0
version 3.1