---
id: CVE-2026-31246
aliases:
  - GHSA-m85w-whwh-qvfx
  - PYSEC-2026-2501
title: >-
  GPT-Pilot contains a command injection vulnerability in the Executor.run()
  method
summary: >-
  GPT-Pilot contains a command injection vulnerability in the Executor.run()
  method
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'
vendor: gpt-pilot
product: gpt-pilot
ecosystem: pip
affected:
  - gpt-pilot <= 0.0.10
published: '2026-05-11'
updated: '2026-07-13'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-m85w-whwh-qvfx'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-31246'
  - url: 'https://github.com/Pythagora-io/gpt-pilot'
  - url: 'https://www.notion.so/CVE-2026-31246-35d1e1393188812ea3c6c88ad28d3d57'
tags:
  - osv
  - pip
epss: 0.00704
epssPercentile: 0.51898
ingestedAt: '2026-07-13T18:58:00.440Z'
---

## Overview

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.

## Affected packages

- `gpt-pilot <= 0.0.10`

## Remediation

Refer to the advisory for the patched release.
