CVE-2024-2032: Zenml Race Condition Vulnerability

LOW
Advisory Identifier: GHSA-c546-8jmq-hprj
CVSS 3.1
CWE-366 CWE-362
Published
Advisory Summary

CVE-2024-2032 is a LOW (CVSS 3.1) race condition vulnerability (CWE-366: Race Condition within a Thread) affecting Zenml libraries in the PyPI ecosystem. The issue involves race condition in zenml. Remediation is available by upgrading affected packages to version 0.55.5.

CVE-2024-2032 at a Glance

CVE Identifier CVE-2024-2032
GHSA Identifier GHSA-c546-8jmq-hprj
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-366: Race Condition within a Thread
Affected Product Zenml
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2024-2032

To remediate this vulnerability, upgrade all affected Zenml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zenml fixed: 0.55.5
pip install zenml>=0.55.5
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 zenml

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-2032, inspect your installed packages using pip:

pip show zenml

Analyze the terminal output to locate any version of Zenml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.55.5), your application is affected.

Note: The pip show zenml command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-366: Race Condition within a Thread, where if two threads of execution use a resource simultaneously, there exists the possibility that resources may be used while invalid, in turn making the state of execution undefined. In Zenml, 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 race condition vulnerability exists in zenml-io/zenml versions up to and including 0.55.3, which allows for the creation of multiple users with the same username when requests are sent in parallel. This issue was fixed in version 0.55.5. The vulnerability arises due to insufficient handling of concurrent user creation requests, leading to data inconsistencies and potential authentication problems. Specifically, concurrent processes may overwrite or corrupt user data, complicating user identification and posing security risks. This issue is particularly concerning for APIs that rely on usernames as input parameters, such as PUT /api/v1/users/test_race, where it could lead to further complications.

CVE-2024-2032 Affected Zenml Versions

1 component(s)
Fixed Versions:
0.55.5
Product / Package Ecosystem Affected Versions Fixed Version
zenml
PyPI
< 0.55.5
0.55.5

References

Frequently Asked Questions

What is CVE-2024-2032?
CVE-2024-2032 is a security vulnerability in Zenml involving Race condition in zenml under CWE-366: Race Condition within a Thread.
Which Zenml versions are affected?
Affected versions include releases prior to 0.55.5 across affected packages: zenml.
What version fixes CVE-2024-2032?
Upgrading to 0.55.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zenml affected?
Yes, zenml is affected in releases prior to 0.55.5. Upgrade your dependency to 0.55.5 or later.
What is the CVSS score of CVE-2024-2032?
CVE-2024-2032 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2024-2032?
CVE-2024-2032 is classified under CWE-366: Race Condition within a Thread (If two threads of execution use a resource simultaneously, there exists the possibility that resources may be used while invalid, in turn making the state of execution undefined.).
How can I check PyPI dependencies for CVE-2024-2032?
Run the dependency tree command: 'pip show zenml'. 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-c546-8jmq-hprj",
  "modified" : "2024-10-11T20:05:28Z",
  "published" : "2024-06-06T21:30:36Z",
  "aliases" : [ "CVE-2024-2032" ],
  "summary" : "Race condition in zenml",
  "details" : "A race condition vulnerability exists in zenml-io/zenml versions up to and including 0.55.3, which allows for the creation of multiple users with the same username when requests are sent in parallel. This issue was fixed in version 0.55.5. The vulnerability arises due to insufficient handling of concurrent user creation requests, leading to data inconsistencies and potential authentication problems. Specifically, concurrent processes may overwrite or corrupt user data, complicating user identification and posing security risks. This issue is particularly concerning for APIs that rely on usernames as input parameters, such as PUT /api/v1/users/test_race, where it could lead to further complications.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "zenml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.55.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-2032"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zenml-io/zenml/commit/afcaf741ef9114c9b32f722f101b97de3d8d147b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/zenml/PYSEC-2024-105.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zenml-io/zenml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/6199cd5d-611f-4ea9-96c5-52a952ba5a56"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-362", "CWE-366" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-06T22:22:19Z",
    "nvd_published_at" : "2024-06-06T19:15:53Z"
  }
}