CVE-2024-5062: Zenml Cross-Site Scripting Vulnerability
MODERATECVE-2024-5062 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Zenml libraries in the PyPI ecosystem. The issue involves reflected cross-site scripting (xss) in zenml. Remediation is available by upgrading affected packages to version 0.58.0.
CVE-2024-5062 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2024-5062
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.
pip install zenml>=0.58.0
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-5062, 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.58.0), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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
CVE-2024-5062 Affected Zenml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
zenml
|
PyPI |
≥ 0.57.1
< 0.58.0
All 1 versions
0.57.1
|
0.58.0
|
References
Frequently Asked Questions
What is CVE-2024-5062?
Which Zenml versions are affected?
What version fixes CVE-2024-5062?
Is zenml affected?
What is the CVSS score of CVE-2024-5062?
What CWE is associated with CVE-2024-5062?
How can I check PyPI dependencies for CVE-2024-5062?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3434-hc3m-8mmm",
"modified" : "2025-01-21T18:27:53Z",
"published" : "2024-06-30T18:30:37Z",
"aliases" : [ "CVE-2024-5062" ],
"summary" : "Reflected Cross-Site Scripting (XSS) in zenml",
"details" : "A reflected Cross-Site Scripting (XSS) vulnerability was identified in zenml-io/zenml version 0.57.1. The vulnerability exists due to improper neutralization of input during web page generation, specifically within the survey redirect parameter. This flaw allows an attacker to redirect users to a specified URL after completing a survey, without proper validation of the 'redirect' parameter. Consequently, an attacker can execute arbitrary JavaScript code in the context of the user's browser session. This vulnerability could be exploited to steal cookies, potentially leading to account takeover.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "zenml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.57.1"
}, {
"fixed" : "0.58.0"
} ]
} ],
"versions" : [ "0.57.1" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-5062"
}, {
"type" : "WEB",
"url" : "https://github.com/zenml-io/zenml/commit/21edd863c0ba53c1110b6f018a07c2d6853cf6d4"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/zenml/PYSEC-2024-176.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/zenml-io/zenml"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/ceddd3c1-a9da-4d6c-85c4-41d4d1e1102f"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-01T18:34:48Z",
"nvd_published_at" : "2024-06-30T16:15:03Z"
}
}