{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-5366 exists.","fix":"No fix has been published for CVE-2026-5366 yet. Limit exposure of the affected software until one is available.","what":"CVE-2026-5366 is a critical command injection vulnerability in prefecthq/prefect, published on 20 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-5366 and fix it if it is affected.\n\nWhat it is: CVE-2026-5366 is a critical command injection vulnerability in prefecthq/prefect, published on 20 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-5366 exists.\n\nAffected product: prefecthq/prefect. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-5366/ (Markdown: https://insights.sbomify.com/CVE-2026-5366/index.md)","id":"CVE-2026-5366","markdown":"https://insights.sbomify.com/CVE-2026-5366/index.md","name":"CVE-2026-5366","record":{"aliases":["GHSA-7pm4-56h2-5rxr"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python workflow library","requires_auth":"low_privilege","summary":"Attackers with deployment permissions can execute arbitrary commands on worker machines by injecting git flags into Prefect storage parameters.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"prefect","vendor":"prefect"}],"cvss":{"score":9.9,"severity":"critical","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2026-06-27","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-06-27T13:41:44Z","kind":"github_poc","ref":"https://github.com/renat0z3r0/prefect-cve-2026-5366","stars":0,"title":"PoC for CVE-2026-5366: git argument injection in Prefect's GitRepository leading to RCE on the worker."}],"tier":"weaponised"},"has_fix":false,"headline":"Git Argument Injection in prefecthq/prefect","id":"CVE-2026-5366","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":0,"n_references":1,"next":{"headline":"Ovn: ovn: information disclosure via crafted dhcpv6 packets","id":"CVE-2026-5367"},"packages":[],"prev":{"headline":"LatePoint \u003c= 5.3.2 - Cross-Site Request Forgery via 'customer_cabinet__request_cancellation' AJAX Route","id":"CVE-2026-5365"},"products":["prefecthq/prefect"],"published":"2026-06-20","related":[{"cvss_score":8.8,"headline":"Cross-Site Request Forgery (CSRF) in prefecthq/prefect","id":"CVE-2023-6022","kev_date_added":null,"published":"2023-11-16"},{"cvss_score":7.5,"headline":"Authentication Bypass in prefecthq/prefect","id":"CVE-2026-3514","kev_date_added":null,"published":"2026-06-02"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-06-22","vendors":["prefecthq"]},"summary":"Attackers with deployment permissions can execute arbitrary commands on worker machines by injecting git flags into Prefect storage parameters.","url":"https://insights.sbomify.com/CVE-2026-5366/"}