CVE-2024-4311: Zenml Missing Ratelimit On Passwrod Resets Vulnerability

MODERATE
Advisory Identifier: GHSA-j3vq-pmp5-r5xj
CVSS 5.4
CWE-770
Published
Advisory Summary

CVE-2024-4311 is a MODERATE (CVSS 5.4) missing ratelimit on passwrod resets vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Zenml libraries in the PyPI ecosystem. The issue involves missing ratelimit on passwrod resets in zenml. Remediation is available by upgrading affected packages to version 0.57.0rc2.

CVE-2024-4311 at a Glance

CVE Identifier CVE-2024-4311
GHSA Identifier GHSA-j3vq-pmp5-r5xj
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Zenml
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.4

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

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

How to Fix CVE-2024-4311

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.57.0rc2
pip install zenml>=0.57.0rc2
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-4311, 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.57.0rc2), 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. 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

zenml-io/zenml version 0.56.4 is vulnerable to an account takeover due to the lack of rate-limiting in the password change function. An attacker can brute-force the current password in the 'Update Password' function, allowing them to take over the user's account. This vulnerability is due to the absence of rate-limiting on the '/api/v1/current-user' endpoint, which does not restrict the number of attempts an attacker can make to guess the current password. Successful exploitation results in the attacker being able to change the password and take control of the account.

CVE-2024-4311 Affected Zenml Versions

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

References

Frequently Asked Questions

What is CVE-2024-4311?
CVE-2024-4311 is a security vulnerability in Zenml involving Missing ratelimit on passwrod resets in zenml under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Zenml versions are affected?
Affected versions include releases prior to 0.57.0rc2 across affected packages: zenml.
What version fixes CVE-2024-4311?
Upgrading to 0.57.0rc2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zenml affected?
Yes, zenml is affected in releases prior to 0.57.0rc2. Upgrade your dependency to 0.57.0rc2 or later.
What is the CVSS score of CVE-2024-4311?
CVE-2024-4311 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:H.
What CWE is associated with CVE-2024-4311?
CVE-2024-4311 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check PyPI dependencies for CVE-2024-4311?
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-j3vq-pmp5-r5xj",
  "modified" : "2024-11-18T21:22:46Z",
  "published" : "2024-11-14T18:30:37Z",
  "aliases" : [ "CVE-2024-4311" ],
  "summary" : "Missing ratelimit on passwrod resets in zenml",
  "details" : "zenml-io/zenml version 0.56.4 is vulnerable to an account takeover due to the lack of rate-limiting in the password change function. An attacker can brute-force the current password in the 'Update Password' function, allowing them to take over the user's account. This vulnerability is due to the absence of rate-limiting on the '/api/v1/current-user' endpoint, which does not restrict the number of attempts an attacker can make to guess the current password. Successful exploitation results in the attacker being able to change the password and take control of the account.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "zenml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.57.0rc2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-4311"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zenml-io/zenml/commit/87a6c2c8f45b49ea83fbb5fe8fff7ab5365a60c9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zenml-io/zenml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/d5517e1a-6b94-4e38-aad6-3aa65f98bec2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-14T22:53:52Z",
    "nvd_published_at" : "2024-11-14T18:15:19Z"
  }
}