CVE-2024-4460: Zenml Improper Line Feed Handling Vulnerability

MODERATE
Advisory Identifier: GHSA-7gjr-hcc3-xfr4
CVSS 4.3
CWE-400
Published
Advisory Summary

CVE-2024-4460 is a MODERATE (CVSS 4.3) improper line feed handling vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Zenml libraries in the PyPI ecosystem. The issue involves improper line feed handling in zenml. Remediation is available by upgrading affected packages to version 0.57.1.

CVE-2024-4460 at a Glance

CVE Identifier CVE-2024-4460
GHSA Identifier GHSA-7gjr-hcc3-xfr4
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Zenml
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

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

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

How to Fix CVE-2024-4460

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.1
pip install zenml>=0.57.1
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-4460, 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.1), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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 denial of service (DoS) vulnerability exists in zenml-io/zenml version 0.56.3 due to improper handling of line feed (`\n`) characters in component names. When a low-privileged user adds a component through the API endpoint `api/v1/workspaces/default/components` with a name containing a `\n` character, it leads to uncontrolled resource consumption. This vulnerability results in the inability of users to add new components in certain categories (e.g., 'Image Builder') and to register new stacks through the UI, thereby degrading the user experience and potentially rendering the ZenML Dashboard unusable. The issue does not affect component addition through the Web UI, as `\n` characters are properly escaped in that context. The vulnerability was tested on ZenML running in Docker, and it was observed in both Firefox and Chrome browsers.

CVE-2024-4460 Affected Zenml Versions

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

References

Frequently Asked Questions

What is CVE-2024-4460?
CVE-2024-4460 is a security vulnerability in Zenml involving Improper line feed handling in zenml under CWE-400: Uncontrolled Resource Consumption.
Which Zenml versions are affected?
Affected versions include releases prior to 0.57.1 across affected packages: zenml.
What version fixes CVE-2024-4460?
Upgrading to 0.57.1 (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.1. Upgrade your dependency to 0.57.1 or later.
What is the CVSS score of CVE-2024-4460?
CVE-2024-4460 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2024-4460?
CVE-2024-4460 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2024-4460?
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-7gjr-hcc3-xfr4",
  "modified" : "2024-06-24T21:28:27Z",
  "published" : "2024-06-24T09:30:52Z",
  "aliases" : [ "CVE-2024-4460" ],
  "summary" : "Improper line feed handling in zenml",
  "details" : "A denial of service (DoS) vulnerability exists in zenml-io/zenml version 0.56.3 due to improper handling of line feed (`\\n`) characters in component names. When a low-privileged user adds a component through the API endpoint `api/v1/workspaces/default/components` with a name containing a `\\n` character, it leads to uncontrolled resource consumption. This vulnerability results in the inability of users to add new components in certain categories (e.g., 'Image Builder') and to register new stacks through the UI, thereby degrading the user experience and potentially rendering the ZenML Dashboard unusable. The issue does not affect component addition through the Web UI, as `\\n` characters are properly escaped in that context. The vulnerability was tested on ZenML running in Docker, and it was observed in both Firefox and Chrome browsers.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "zenml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.57.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-4460"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zenml-io/zenml/commit/164cc09032060bbfc17e9dbd62c13efd5ff5771b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zenml-io/zenml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/a387c935-b970-44d7-bddc-71c1c90aa2de"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-24T21:28:27Z",
    "nvd_published_at" : "2024-06-24T07:15:15Z"
  }
}