# CVE-2022-24753: Code injection in Stripe CLI on windows

> An attacker can execute arbitrary code on Windows by planting files in a directory where specific Stripe CLI commands are run.

- **Severity:** High 7.7 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 9 Mar 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-4cx6-fj7j-pjx9, GO-2022-0350

## What is CVE-2022-24753?

CVE-2022-24753 is a high-severity command injection vulnerability in stripe-cli, published on 9 Mar 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Stripe CLI is a command-line tool for the Stripe eCommerce platform. A 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. An 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.Users are advised to upgrade to version 1.7.13. There are no known workarounds for this issue.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2022-24753?

3 open source packages ship an affected version, including github.com/stripe/stripe-cli. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/stripe/stripe-cli` | Go | All versions | 1.7.13 |
| `github.com/stripe/stripe-cli` | Go | All versions | 1.7.13 |
| `github.com/stripe/stripe-cli` | Go | All versions | 1.7.13 |

Products: Stripe Stripe Cli.

## How do I fix CVE-2022-24753?

Upgrade github.com/stripe/stripe-cli to 1.7.13 or later.

## Is CVE-2022-24753 being exploited?

There is no known exploitation of CVE-2022-24753 in the wild and no public exploit code.

## Other vulnerabilities in stripe-cli

- [CVE-2024-45401](https://insights.sbomify.com/CVE-2024-45401/): stripe-cli Path Traversal vulnerability (high 7.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-24753 and fix it if it is affected.

What it is: CVE-2022-24753 is a high-severity command injection vulnerability in stripe-cli, published on 9 Mar 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-24753 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/stripe/stripe-cli (Go): affected all versions; fixed in 1.7.13
- github.com/stripe/stripe-cli (Go): affected all versions; fixed in 1.7.13
- github.com/stripe/stripe-cli (Go): affected all versions; fixed in 1.7.13

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-24753/ (Markdown: https://insights.sbomify.com/CVE-2022-24753/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-24753
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-24753
- OSV: https://osv.dev/vulnerability/CVE-2022-24753

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-24753/
Summaries are generated and may contain mistakes; the official description above is the record.
