CVE-2022-24753: Github.com/stripe/stripe cli Code Injection Vulnerability
HIGHCVE-2022-24753 is a HIGH (CVSS 7.7) code injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Github.com/stripe/stripe cli libraries in the Go ecosystem. The issue involves code injection in stripe cli on windows. Remediation is available by upgrading affected packages to version 1.7.13.
CVE-2022-24753 at a Glance
Security Impact
CVSS: 7.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H).
How to Fix CVE-2022-24753
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.
Upgrade github.com/stripe/stripe-cli to 1.7.13
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-2022-24753, 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.7.13), 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. 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
CVE-2022-24753 Affected Github.com/stripe/stripe cli Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/stripe/stripe-cli
|
Go |
< 1.7.13
|
1.7.13
|
References
Frequently Asked Questions
What is CVE-2022-24753?
Which Github.com/stripe/stripe cli versions are affected?
What version fixes CVE-2022-24753?
Is github.com/stripe/stripe-cli affected?
What is the CVSS score of CVE-2022-24753?
What CWE is associated with CVE-2022-24753?
How can I check Go dependencies for CVE-2022-24753?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4cx6-fj7j-pjx9",
"modified" : "2022-03-18T21:10:48Z",
"published" : "2022-03-10T18:17:50Z",
"aliases" : [ "CVE-2022-24753" ],
"summary" : "Code injection in Stripe CLI on windows",
"details" : "### Impact\nA vulnerability in Stripe CLI exists on Windows when certain commands are run in a directory where an attacker has planted files. The commands are `stripe login`, `stripe config -e`, `stripe community`, and `stripe open`. MacOS and Linux are unaffected.\n\nAn attacker who successfully exploits the vulnerability can run arbitrary code in the context of the current user. The update addresses the vulnerability by throwing an error in these situations before the code can run.\n\nThere has been no evidence of exploitation of this vulnerability.\n\n### Recommendation\nUpgrade to Stripe CLI v1.7.13.\n\n### Acknowledgments\nThanks to [trungpabc](https://hackerone.com/trungpabc) for reporting the issue.\n\n### For more information\nEmail us at [security@stripe.com](mailto:security@stripe.com).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/stripe/stripe-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.13"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/stripe/stripe-cli/security/advisories/GHSA-4cx6-fj7j-pjx9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24753"
}, {
"type" : "WEB",
"url" : "https://github.com/stripe/stripe-cli/commit/be38da5c0191adb77f661f769ffff2fbc7ddf6cd"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/stripe/stripe-cli"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-10T18:17:50Z",
"nvd_published_at" : "2022-03-09T23:15:00Z"
}
}