Vulnerabilities in pkg:golang/github.com/stripe/stripe-cli

PACKAGE
Advisory Identifier: GHSA-fv4g-gwpj-74gr
Advisory Summary

CVE-2024-45401 is a LOW (CVSS 7.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/stripe/stripe cli libraries in the Go ecosystem. The issue involves path traversal vulnerability in stripe-cli. Remediation is available by upgrading affected packages to version 1.21.3.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/stripe/stripe-cli

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/stripe/stripe-cli. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-fv4g-gwpj-74gr CVE-2024-45401 LOW Path traversal vulnerability in stripe-cli
GHSA-4cx6-fj7j-pjx9 CVE-2022-24753 HIGH Code injection in Stripe CLI on windows

CVE-2024-45401 at a Glance

CVE Identifier CVE-2024-45401
GHSA Identifier GHSA-fv4g-gwpj-74gr
Severity LOW
CVSS v3.1 Base Score 7.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/stripe/stripe cli
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-45401

To remediate this vulnerability, upgrade all affected Github.com/stripe/stripe cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/stripe/stripe-cli fixed: 1.21.3
Upgrade github.com/stripe/stripe-cli to 1.21.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/stripe/stripe-cli

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-45401, inspect your project dependencies for Github.com/stripe/stripe cli:

inspect dependencies for github.com/stripe/stripe-cli

Analyze the terminal output to locate any version of Github.com/stripe/stripe cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.21.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/stripe/stripe cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact A vulnerability exists in stripe-cli versions 1.11.1 and higher where a plugin package containing a manifest with a malformed plugin shortname installed using the --archive-url or --archive-path flags can overwrite arbitrary files. The update addresses the path traversal vulnerability by removing the ability to install plugins from an archive URL or path. There has been no evidence of exploitation of this vulnerability. ### Recommendation Upgrade to stripe-cli v1.21.3. ### Acknowledgements Thank you to [0xacb](https://hackerone.com/0xacb) and [bordiez](https://hackerone.com/bordiez) for reporting this vulnerability. ### For more information Email us at [security@stripe.com](mailto:security@stripe.com)

CVE-2024-45401 Affected Github.com/stripe/stripe cli Versions

1 component(s)
Fixed Versions:
1.21.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/stripe/stripe-cli
Go
≥ 1.11.1
< 1.21.3
1.21.3

References

Frequently Asked Questions

What is CVE-2024-45401?
CVE-2024-45401 is a security vulnerability in Github.com/stripe/stripe cli involving Path traversal vulnerability in stripe-cli under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/stripe/stripe cli versions are affected?
Affected versions include releases prior to 1.21.3 across affected packages: github.com/stripe/stripe-cli.
What version fixes CVE-2024-45401?
Upgrading to 1.21.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/stripe/stripe-cli affected?
Yes, github.com/stripe/stripe-cli is affected in releases prior to 1.21.3. Upgrade your dependency to 1.21.3 or later.
What is the CVSS score of CVE-2024-45401?
CVE-2024-45401 has a CVSS v3.1 base score of 7.5 (LOW) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-45401?
CVE-2024-45401 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2024-45401?
Run the dependency tree command: 'inspect dependencies for github.com/stripe/stripe-cli'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fv4g-gwpj-74gr",
  "modified" : "2024-11-18T16:27:10Z",
  "published" : "2024-09-05T16:40:41Z",
  "aliases" : [ "CVE-2024-45401" ],
  "summary" : "Path traversal vulnerability in stripe-cli ",
  "details" : "### Impact\nA vulnerability exists in stripe-cli versions 1.11.1 and higher where a plugin package containing a manifest with a malformed plugin shortname installed using the --archive-url or --archive-path flags can overwrite arbitrary files.\n\nThe update addresses the path traversal vulnerability by removing the ability to install plugins from an archive URL or path.\n\nThere has been no evidence of exploitation of this vulnerability.\n\n### Recommendation\nUpgrade to stripe-cli v1.21.3.\n\n### Acknowledgements\nThank you to [0xacb](https://hackerone.com/0xacb) and [bordiez](https://hackerone.com/bordiez) for reporting this vulnerability.\n\n### For more information\nEmail us at [security@stripe.com](mailto:security@stripe.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/stripe/stripe-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.11.1"
      }, {
        "fixed" : "1.21.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/stripe/stripe-cli/security/advisories/GHSA-fv4g-gwpj-74gr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45401"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/stripe/stripe-cli"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-05T16:40:41Z",
    "nvd_published_at" : "2024-09-05T18:15:06Z"
  }
}