{"id":"CVE-2026-5366","published":"2026-06-20T16:43:37Z","modified":"2026-06-22T17:25:02Z","title":"Git Argument Injection in prefecthq/prefect","vendor":"prefecthq","product":"prefecthq/prefect","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.9,"severity":"CRITICAL","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01034,"percentile":0.6466,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a","tags":[]}],"priority":{"score":24.9,"factors":[{"name":"EPSS percentile","points":12.93},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.93}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-06-27","earliestUrl":"https://github.com/renat0z3r0/prefect-cve-2026-5366","repos":[{"name":"renat0z3r0/prefect-cve-2026-5366","url":"https://github.com/renat0z3r0/prefect-cve-2026-5366","stars":0,"created":"2026-06-27"}]},"first":{"date":"2026-06-27","source":"PoC-in-GitHub","url":"https://github.com/renat0z3r0/prefect-cve-2026-5366"},"provenance":"source"},"vendorSlug":"prefecthq","affectedVersions":[{"vendor":"prefecthq","product":"prefecthq/prefect","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-06-22T17:24:58.249220Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"prefect","vulnerableRanges":[">=3.1.11, <3.6.25"],"patched":["3.6.25"],"from":["GHSA-7pm4-56h2-5rxr"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-38128","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-3514","published":"2026-06-02","fixed":"3.6.22","kev":false},{"cve":"CVE-2026-7722","published":"2026-05-04","fixed":"3.6.22","kev":false},{"cve":"CVE-2026-7725","published":"2026-05-04","fixed":"3.6.25.dev7","kev":false,"link":{"from":"CVE-2026-7725","to":"CVE-2026-5366","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:prefect","fromFixed":"3.6.25.dev7","toFixed":"3.6.25","daysApart":47}]}},{"cve":"CVE-2026-5366","published":"2026-06-20","fixed":"3.6.25","kev":false},{"cve":"CVE-2026-7724","published":"2026-05-04","fixed":"3.6.28.dev2","kev":false}],"package":"PyPI:prefect"}}