CVE-2024-34062: Tqdm Tqdm CLI Arguments Injection Attack Vulnerability
LOWCVE-2024-34062 is a LOW (CVSS 3.9) tqdm cli arguments injection attack vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Tqdm libraries in the PyPI ecosystem. The issue involves tqdm cli arguments injection attack. Remediation is available by upgrading affected packages to version 4.66.3.
CVE-2024-34062 at a Glance
Security Impact
CVSS: 3.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-34062
To remediate this vulnerability, upgrade all affected Tqdm 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 tqdm>=4.66.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show tqdm
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-34062, inspect your installed packages using pip:
pip show tqdm
Analyze the terminal output to locate any version of Tqdm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.66.3), your application is affected.
Note: The pip show tqdm command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Tqdm, 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-34062 Affected Tqdm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tqdm
|
PyPI |
≥ 4.4.0
< 4.66.3
|
4.66.3
|
References
Frequently Asked Questions
What is CVE-2024-34062?
Which Tqdm versions are affected?
What version fixes CVE-2024-34062?
Is tqdm affected?
What is the CVSS score of CVE-2024-34062?
What CWE is associated with CVE-2024-34062?
How can I check PyPI dependencies for CVE-2024-34062?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g7vv-2v7x-gj9p",
"modified" : "2024-06-10T18:30:57Z",
"published" : "2024-05-03T19:33:28Z",
"aliases" : [ "CVE-2024-34062" ],
"summary" : "tqdm CLI arguments injection attack",
"details" : "### Impact\nAny optional non-boolean CLI arguments (e.g. `--delim`, `--buf-size`, `--manpath`) are passed through python's `eval`, allowing arbitrary code execution. Example:\n\n```sh\npython -m tqdm --manpath=\"\\\" + str(exec(\\\"import os\\nos.system('echo hi && killall python3')\\\")) + \\\"\"\n```\n\n### Patches\nhttps://github.com/tqdm/tqdm/commit/4e613f84ed2ae029559f539464df83fa91feb316 released in `tqdm>=4.66.3`\n\n### Workarounds\nNone\n\n### References\n- https://github.com/tqdm/tqdm/releases/tag/v4.66.3",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "tqdm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.4.0"
}, {
"fixed" : "4.66.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tqdm/tqdm/security/advisories/GHSA-g7vv-2v7x-gj9p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34062"
}, {
"type" : "WEB",
"url" : "https://github.com/tqdm/tqdm/commit/4e613f84ed2ae029559f539464df83fa91feb316"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tqdm/tqdm"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PA3GIGHPWAHCTT4UF57LTPZGWHAX3GW6"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QRECVQCCESHBS3UJOWNXQUIX725TKNY6"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VA337CYUS4SLRFV2P6MX6MZ2LKFURKJC"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-03T19:33:28Z",
"nvd_published_at" : "2024-05-03T10:15:08Z"
}
}