GHSA-vx24-x4mv-vwr5

Suggest an improvement
Source
https://github.com/advisories/GHSA-vx24-x4mv-vwr5
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/07/GHSA-vx24-x4mv-vwr5/GHSA-vx24-x4mv-vwr5.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vx24-x4mv-vwr5
Aliases
Published
2024-07-26T21:24:18Z
Modified
2024-07-26T21:48:45Z
Severity
  • 7.4 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands
Details

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.

Database specific
{
    "nvd_published_at": "2024-07-26T21:15:14Z",
    "cwe_ids": [
        "CWE-77",
        "CWE-78"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2024-07-26T21:24:18Z"
}
References

Affected packages

crates.io / starship

Package

Affected ranges

Type
SEMVER
Events
Introduced
1.0.0
Fixed
1.20.0

Database specific

{
    "last_known_affected_version_range": "<= 1.19.0"
}