CVE-2024-8183: Prefect Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-4v9f-r55g-g6hc
CVSS 7.6
CWE-346
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2024-8183
GHSA Identifier GHSA-4v9f-r55g-g6hc
Severity HIGH
CVSS v3.1 Base Score 7.6
CWE Classification CWE-346: Origin Validation Error
Affected Product Prefect
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability Low (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.

prefect fixed: 3.0.3
pip install prefect>=3.0.3
prefect fixed: 2.20.17
pip install prefect>=2.20.17
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-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

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.

CVE-2024-8183 Affected Prefect Versions

2 component(s)
Fixed Versions:
3.0.32.20.17
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?
CVE-2024-8183 is a security vulnerability in Prefect involving Prefect CORS (Cross-Origin Resource Sharing) misconfiguration under CWE-346: Origin Validation Error.
Which Prefect versions are affected?
Affected versions include releases prior to 3.0.3, 2.20.17 across affected packages: prefect.
What version fixes CVE-2024-8183?
Upgrading to 3.0.3, 2.20.17 (or the latest patched release for your respective branch) resolves the vulnerability.
Is prefect affected?
Yes, prefect is affected in releases prior to 3.0.3, 2.20.17. Upgrade your dependency to 3.0.3, 2.20.17 or later.
What is the CVSS score of CVE-2024-8183?
CVE-2024-8183 has a CVSS v3.1 base score of 7.6 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L.
What CWE is associated with CVE-2024-8183?
CVE-2024-8183 is classified under CWE-346: Origin Validation Error (The product does not properly verify that the source of data or communication is valid.).
How can I check PyPI dependencies for CVE-2024-8183?
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-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"
  }
}