CVE-2024-8183: Prefect Remote Code Execution Vulnerability
HIGHCVE-2024-8183 is a HIGH (CVSS 7.6) remote code execution vulnerability (CWE-346: Origin Validation Error) affecting Prefect libraries in the PyPI ecosystem. The issue involves prefect cors (cross-origin resource sharing) misconfiguration. Remediation is available by upgrading affected packages to version 3.0.3, 2.20.17.
CVE-2024-8183 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L).
How to Fix CVE-2024-8183
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.
pip install prefect>=3.0.3
pip install prefect>=2.20.17
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-2024-8183, 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 3.0.3), 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-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. 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
CVE-2024-8183 Affected Prefect Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
prefect
|
PyPI |
≥ 3.0.0rc1
< 3.0.3
|
3.0.3
|
|
prefect
|
PyPI |
< 2.20.17
|
2.20.17
|
References
Frequently Asked Questions
What is CVE-2024-8183?
Which Prefect versions are affected?
What version fixes CVE-2024-8183?
Is prefect affected?
What is the CVSS score of CVE-2024-8183?
What CWE is associated with CVE-2024-8183?
How can I check PyPI dependencies for CVE-2024-8183?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4v9f-r55g-g6hc",
"modified" : "2025-03-26T15:36:24Z",
"published" : "2025-03-20T12:32:47Z",
"aliases" : [ "CVE-2024-8183" ],
"summary" : "Prefect CORS (Cross-Origin Resource Sharing) misconfiguration",
"details" : "A CORS (Cross-Origin Resource Sharing) misconfiguration in prefecthq/prefect prior to version 3.0.3 allows unauthorized domains to access sensitive data. This vulnerability can lead to unauthorized access to the database, resulting in potential data leaks, loss of confidentiality, service disruption, and data integrity risks.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "prefect"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0rc1"
}, {
"fixed" : "3.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "prefect"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.20.17"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-8183"
}, {
"type" : "WEB",
"url" : "https://github.com/PrefectHQ/prefect/issues/15074"
}, {
"type" : "WEB",
"url" : "https://github.com/PrefectHQ/prefect/commit/8f159b404126d93964a4daace7619bc553fa318c"
}, {
"type" : "WEB",
"url" : "https://github.com/prefecthq/prefect/commit/a69266e077169b8a32ad76b1dd3ea63b96d011c2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/PrefectHQ/prefect"
}, {
"type" : "WEB",
"url" : "https://github.com/PrefectHQ/prefect/releases/tag/2.20.17"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/b801de43-ff9f-4db9-b583-4797d4f7d3d2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-346" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-20T20:43:33Z",
"nvd_published_at" : "2025-03-20T10:15:41Z"
}
}