Skip to main content

CVE-2022-24753: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in stripe stripe-cli

Medium
Published: Wed Mar 09 2022 (03/09/2022, 22:35:09 UTC)
Source: CVE
Vendor/Project: stripe
Product: stripe-cli

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.

AI-Powered Analysis

AILast updated: 06/23/2025, 14:43:04 UTC

Technical Analysis

CVE-2022-24753 is an OS command injection vulnerability identified in the Stripe CLI tool, specifically affecting Windows environments running versions prior to 1.7.13. Stripe CLI is a command-line interface used by developers and administrators to interact with the Stripe eCommerce platform. The vulnerability arises when certain commands—namely `stripe login`, `stripe config -e`, `stripe community`, and `stripe open`—are executed within directories where an attacker has pre-placed malicious files. Due to improper neutralization of special elements in OS commands (CWE-78), the CLI tool fails to sanitize inputs correctly, allowing an attacker to inject arbitrary commands that execute with the privileges of the current user. This can lead to arbitrary code execution on the affected system. Notably, this vulnerability is limited to Windows platforms; macOS and Linux versions of Stripe CLI are not impacted. The issue is mitigated in version 1.7.13 by introducing checks that throw errors when unsafe conditions are detected, preventing the execution of malicious code. No known exploits have been reported in the wild, and no workarounds exist aside from upgrading to the patched version. The vulnerability requires that an attacker have the ability to place files in the target directory and that the user runs one of the vulnerable commands, indicating a need for some level of user interaction or prior access to the environment.

Potential Impact

For European organizations, the impact of this vulnerability can be significant, particularly for those heavily reliant on Stripe CLI for managing payment infrastructure or development workflows on Windows systems. Successful exploitation could lead to arbitrary code execution, potentially compromising the confidentiality, integrity, and availability of systems and data. This could result in unauthorized access to sensitive payment processing information, disruption of eCommerce operations, or lateral movement within corporate networks. Given Stripe's widespread use in European eCommerce and fintech sectors, organizations that do not promptly update may face increased risk of targeted attacks or exploitation by opportunistic attackers. The vulnerability's reliance on attacker-controlled files in directories and user execution of commands somewhat limits the attack surface but does not eliminate risk, especially in environments where developers or administrators operate with elevated privileges or where endpoint security is lax. Additionally, compromised systems could serve as footholds for broader attacks against critical infrastructure or financial services, which are strategically important in Europe.

Mitigation Recommendations

1. Immediate upgrade of all Stripe CLI installations on Windows systems to version 1.7.13 or later to ensure the vulnerability is patched. 2. Implement strict directory permissions and monitoring to prevent unauthorized file creation or modification in directories where Stripe CLI commands are executed. 3. Educate developers and administrators to avoid running Stripe CLI commands in untrusted or shared directories, especially those writable by multiple users or external parties. 4. Employ endpoint detection and response (EDR) solutions to monitor for suspicious command execution patterns related to Stripe CLI usage. 5. Integrate application whitelisting and privilege separation to limit the impact of potential code execution by restricting Stripe CLI usage to non-administrative accounts where feasible. 6. Conduct regular audits of development and operational environments to identify and remediate any unauthorized files or suspicious activity. 7. Establish secure development environment policies that include the use of isolated or containerized environments for running CLI tools to reduce exposure. These measures go beyond generic patching by focusing on operational hygiene and environment hardening to reduce the likelihood of exploitation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-02-10T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9842c4522896dcbf276f

Added to database: 5/21/2025, 9:09:22 AM

Last enriched: 6/23/2025, 2:43:04 PM

Last updated: 8/18/2025, 8:42:00 AM

Views: 19

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats