CVE-2026-5366: CWE-94 Improper Control of Generation of Code in prefecthq prefecthq/prefect
Prefect version 3.6.23 is vulnerable to remote code execution due to improper handling of user-controlled input in the `GitRepository` storage class. The `commit_sha` parameter, which is passed to git commands, lacks validation and does not include a `--` separator to distinguish user input from git flags. This allows attackers to inject arbitrary git flags, such as `--upload-pack`, enabling execution of external programs. Additionally, the `directories` parameter can be exploited to inject git flags during sparse-checkout operations. These vulnerabilities allow any user with deployment creation permissions to execute arbitrary commands on worker machines, compromising shared work pools in multi-tenant environments.
AI Analysis
Technical Summary
CVE-2026-5366 is a critical vulnerability in prefecthq/prefect (version 3.6.23) involving improper control of code generation (CWE-94). The `commit_sha` parameter lacks validation and does not use a `--` separator to distinguish user input from git flags, enabling injection of arbitrary git flags such as `--upload-pack`. Similarly, the `directories` parameter can be exploited during sparse-checkout operations to inject git flags. These issues allow users with deployment creation permissions to execute arbitrary commands on worker machines, threatening multi-tenant shared work pools. The CVSS v3.0 score is 9.9, reflecting high impact on confidentiality, integrity, and availability.
Potential Impact
An attacker with deployment creation permissions can execute arbitrary commands on worker machines by injecting malicious git flags through the `commit_sha` and `directories` parameters. This leads to full compromise of the affected systems, including potential control over shared work pools in multi-tenant environments, resulting in complete loss of confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict deployment creation permissions to trusted users only and avoid using affected versions in sensitive environments. Monitor vendor channels for updates and apply patches promptly once released.
CVE-2026-5366: CWE-94 Improper Control of Generation of Code in prefecthq prefecthq/prefect
Description
Prefect version 3.6.23 is vulnerable to remote code execution due to improper handling of user-controlled input in the `GitRepository` storage class. The `commit_sha` parameter, which is passed to git commands, lacks validation and does not include a `--` separator to distinguish user input from git flags. This allows attackers to inject arbitrary git flags, such as `--upload-pack`, enabling execution of external programs. Additionally, the `directories` parameter can be exploited to inject git flags during sparse-checkout operations. These vulnerabilities allow any user with deployment creation permissions to execute arbitrary commands on worker machines, compromising shared work pools in multi-tenant environments.
CVSS v3.0
Score 9.9critical
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-5366 is a critical vulnerability in prefecthq/prefect (version 3.6.23) involving improper control of code generation (CWE-94). The `commit_sha` parameter lacks validation and does not use a `--` separator to distinguish user input from git flags, enabling injection of arbitrary git flags such as `--upload-pack`. Similarly, the `directories` parameter can be exploited during sparse-checkout operations to inject git flags. These issues allow users with deployment creation permissions to execute arbitrary commands on worker machines, threatening multi-tenant shared work pools. The CVSS v3.0 score is 9.9, reflecting high impact on confidentiality, integrity, and availability.
Potential Impact
An attacker with deployment creation permissions can execute arbitrary commands on worker machines by injecting malicious git flags through the `commit_sha` and `directories` parameters. This leads to full compromise of the affected systems, including potential control over shared work pools in multi-tenant environments, resulting in complete loss of confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict deployment creation permissions to trusted users only and avoid using affected versions in sensitive environments. Monitor vendor channels for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2026-04-01T18:18:27.682Z
- Cvss Version
- 3.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a36c95749568db4e21a902c
Added to database: 06/20/2026, 17:09:43 UTC
Last enriched: 06/27/2026, 21:46:24 UTC
Last updated: 08/04/2026, 12:46:14 UTC
Views: 270
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.