# CVE-2024-34062: tqdm CLI arguments injection attack


- **Severity:** Medium 4.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 3 May 2024
- **Updated:** 13 Feb 2025
- **Also known as:** AZL-40285, AZL-40307, CLSA-2025-1758672759, DEBIAN-CVE-2024-34062, GHSA-g7vv-2v7x-gj9p, MGASA-2024-0299, OESA-2024-1554, OESA-2024-1555, OESA-2024-1658, OESA-2024-1659, PYSEC-2026-1976, SUSE-SU-2024:1872-1, UBUNTU-CVE-2024-34062, USN-7216-1, openSUSE-SU-2024:13939-1

## What is CVE-2024-34062?

CVE-2024-34062 is a medium-severity vulnerability in tqdm, published on 3 May 2024. 

### Official description

tqdm is an open source progress bar for Python and CLI. Any optional non-boolean CLI arguments (e.g. `--delim`, `--buf-size`, `--manpath`) are passed through python's `eval`, allowing arbitrary code execution. This issue is only locally exploitable and had been addressed in release version 4.66.3. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## Which versions are affected by CVE-2024-34062?

3 open source packages ship an affected version, including tqdm.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tqdm` | PyPI | From 4.4.0 | 4.66.3 |
| `tqdm` | PyPI | From 4.4.0 | 4.66.3 |
| `tqdm` | PyPI | From 4.4.0 | 4.66.3 |
| `python-tqdm` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | SUSE:Linux Enterprise Module for Python 3 15 SP5 | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | openSUSE:Leap 15.5 | All versions | 4.66.4-150400.9.12.1 |
| `python-tqdm` | openSUSE:Leap 15.6 | All versions | 4.66.4-150400.9.12.1 |

## How do I fix CVE-2024-34062?

Upgrade tqdm to 4.66.3 or later.

## Is CVE-2024-34062 being exploited?

There is no known exploitation of CVE-2024-34062 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-34062 and fix it if it is affected.

What it is: CVE-2024-34062 is a medium-severity vulnerability in tqdm, published on 3 May 2024. 
Exploitation: There is no known exploitation of CVE-2024-34062 in the wild and no public exploit code.

Affected packages and fixed versions:
- tqdm (PyPI): affected from 4.4.0; fixed in 4.66.3
- tqdm (PyPI): affected from 4.4.0; fixed in 4.66.3
- tqdm (PyPI): affected from 4.4.0; fixed in 4.66.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-34062/ (Markdown: https://insights.sbomify.com/CVE-2024-34062/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-34062
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-34062
- OSV: https://osv.dev/vulnerability/CVE-2024-34062

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-34062/
Summaries are generated and may contain mistakes; the official description above is the record.
