CVE-2026-3515: Prefect Prefect Has An Argument Injection Vulnerability

HIGH
Advisory Identifier: GHSA-cw25-2p92-7f75
CVSS 8.5
CWE-88
Published
Advisory Summary

CVE-2026-3515 is a HIGH (CVSS 8.5) prefect has an argument injection vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Prefect libraries in the PyPI ecosystem. The issue involves prefect has an argument injection issue. Remediation is available in the latest vendor maintenance releases.

CVE-2026-3515 at a Glance

CVE Identifier CVE-2026-3515
GHSA Identifier GHSA-cw25-2p92-7f75
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Affected Product Prefect
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.5

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

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

How to Fix CVE-2026-3515

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

prefect fixed: Latest secure release
pip install prefect>=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 prefect

How to Check if You Are Affected

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

pip show prefect

Analyze the terminal output to locate any version of Prefect 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 prefect command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. In Prefect, 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

A vulnerability in the `GitHubRepository` block of the `prefect-github` integration in Prefect version 3.6.18 allows an attacker to inject arbitrary git command-line options via the `reference` field. The `reference` field is concatenated directly into a `git clone` command string without proper sanitization, and then parsed by `shlex.split()`. This enables injection of options such as `-c`, leading to potential Server-Side Request Forgery (SSRF), credential theft, or remote code execution (RCE). The vulnerability affects both the `aget_directory()` and `get_directory()` methods in `src/integrations/prefect-github/prefect_github/repository.py`. This issue does not affect the GitLab and BitBucket integrations, which use a safer list-based command construction approach.

CVE-2026-3515 Affected Prefect Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
prefect
PyPI
≤ 3.6.18

References

Frequently Asked Questions

What is CVE-2026-3515?
CVE-2026-3515 is a security vulnerability in Prefect involving Prefect has an Argument Injection issue under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection').
Which Prefect versions are affected?
Affected versions include releases prior to current release patches across affected packages: prefect.
What version fixes CVE-2026-3515?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is prefect affected?
Yes, prefect 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-3515?
CVE-2026-3515 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2026-3515?
CVE-2026-3515 is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.).
How can I check PyPI dependencies for CVE-2026-3515?
Run the dependency tree command: 'pip show prefect'. 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-cw25-2p92-7f75",
  "modified" : "2026-06-30T15:12:20Z",
  "published" : "2026-05-26T13:30:29Z",
  "aliases" : [ "CVE-2026-3515" ],
  "summary" : "Prefect has an Argument Injection issue",
  "details" : "A vulnerability in the `GitHubRepository` block of the `prefect-github` integration in Prefect version 3.6.18 allows an attacker to inject arbitrary git command-line options via the `reference` field. The `reference` field is concatenated directly into a `git clone` command string without proper sanitization, and then parsed by `shlex.split()`. This enables injection of options such as `-c`, leading to potential Server-Side Request Forgery (SSRF), credential theft, or remote code execution (RCE). The vulnerability affects both the `aget_directory()` and `get_directory()` methods in `src/integrations/prefect-github/prefect_github/repository.py`. This issue does not affect the GitLab and BitBucket integrations, which use a safer list-based command construction approach.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "prefect"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.6.18"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-3515"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/PrefectHQ/prefect"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/f3b048b8-7f4e-45ef-a5a7-cb841c39acde"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-88" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-30T15:12:20Z",
    "nvd_published_at" : "2026-05-24T05:16:39Z"
  }
}