Vulnerabilities in pkg:pypi/gpt-pilot

PACKAGE
Advisory Identifier: GHSA-m85w-whwh-qvfx
Advisory Summary

CVE-2026-31246 is a MODERATE (CVSS 6.5) gpt-pilot contains a command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Gpt pilot libraries in the PyPI ecosystem. The issue involves gpt-pilot contains a command injection vulnerability in the executor.run() method. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/gpt-pilot

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/gpt-pilot. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m85w-whwh-qvfx CVE-2026-31246 MODERATE GPT-Pilot contains a command injection vulnerability in the Executor.run() method

CVE-2026-31246 at a Glance

CVE Identifier CVE-2026-31246
GHSA Identifier GHSA-m85w-whwh-qvfx
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Gpt pilot
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-31246

To remediate this vulnerability, upgrade all affected Gpt pilot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

gpt-pilot fixed: Latest secure release
pip install gpt-pilot>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show gpt-pilot

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-31246, inspect your installed packages using pip:

pip show gpt-pilot

Analyze the terminal output to locate any version of Gpt pilot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show gpt-pilot command checks currently installed packages in your active Python environment.

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 Gpt pilot, 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

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.

CVE-2026-31246 Affected Gpt pilot Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
gpt-pilot
PyPI
≤ 0.0.10

References

Frequently Asked Questions

What is CVE-2026-31246?
CVE-2026-31246 is a security vulnerability in Gpt pilot involving GPT-Pilot contains a command injection vulnerability in the Executor.run() method under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Gpt pilot versions are affected?
Affected versions include releases prior to current release patches across affected packages: gpt-pilot.
What version fixes CVE-2026-31246?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is gpt-pilot affected?
Yes, gpt-pilot is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-31246?
CVE-2026-31246 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-31246?
CVE-2026-31246 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (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.).
How can I check PyPI dependencies for CVE-2026-31246?
Run the dependency tree command: 'pip show gpt-pilot'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m85w-whwh-qvfx",
  "modified" : "2026-05-27T22:48:48Z",
  "published" : "2026-05-11T18:31:43Z",
  "aliases" : [ "CVE-2026-31246" ],
  "summary" : "GPT-Pilot contains a command injection vulnerability in the Executor.run() method",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "gpt-pilot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.0.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-31246"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Pythagora-io/gpt-pilot"
  }, {
    "type" : "WEB",
    "url" : "https://www.notion.so/CVE-2026-31246-35d1e1393188812ea3c6c88ad28d3d57"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-27T22:48:48Z",
    "nvd_published_at" : "2026-05-11T16:17:29Z"
  }
}