ghsa-vx24-x4mv-vwr5
Vulnerability from github
Published
2024-07-26 21:24
Modified
2024-07-26 21:48
Severity
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.

Show details on source website


{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.19.0"
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "starship"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.0.0"
            },
            {
              "fixed": "1.20.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-41815"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-07-26T21:24:18Z",
    "nvd_published_at": "2024-07-26T21:15:14Z",
    "severity": "HIGH"
  },
  "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 = \u0027git show -s --format=\"%\u003c(25,mtrunc)%s\"\u0027\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\u0027 commands, it could be hard to successfully target someone. ",
  "id": "GHSA-vx24-x4mv-vwr5",
  "modified": "2024-07-26T21:48:45Z",
  "published": "2024-07-26T21:24:18Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...