CVE-2024-34062
Medium · 4.8CVSS
4.8
EPSS
0.4%
Published
May 3, 2024
CISA due date
—
Cloudanix analysis
An older version of a common Python progress-bar tool can be tricked into running unwanted commands when it is launched with specially crafted local options.
- Exploitation
- Requires User Interaction
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw is a local command injection/arbitrary code execution issue in the tqdm Python/CLI progress bar utility. Affected versions evaluate optional non-boolean command-line argument values, such as --delim, --buf-size, and --manpath, using Python eval(). If an attacker can cause a user, script, job, or automation workflow to invoke the tqdm CLI with attacker-controlled values for those arguments, the supplied Python expression can execute with the privileges of the tqdm process. The vulnerability is local, requires low privileges and user interaction, and can affect confidentiality, integrity, and availability at the privilege level of the invoking user or service account.
Why it matters to the business
The most likely business impact is compromise of developer workstations, CI/CD jobs, data-processing scripts, or automation environments that use tqdm from the command line with untrusted or externally supplied arguments. Successful exploitation could allow theft of local files or secrets available to the process, modification of build or processing outputs, installation of persistence under the user context, or disruption of jobs. The public exploitation signal is currently low, with no CISA KEV listing, no ransomware association, and low EPSS, but tqdm is a common Python dependency and the issue has been public since 2024, so stale pinned versions remain a supply-chain hygiene risk.
How an attack unfolds
An attacker first needs a way to influence command-line arguments passed to the tqdm CLI. This could occur through a malicious local user, a poisoned script, a copied command, a manipulated wrapper around tqdm, or an automation pipeline that passes untrusted input into optional tqdm arguments. The attacker supplies a Python expression in a vulnerable non-boolean option such as --delim, --buf-size, or --manpath. When tqdm parses the option, the vulnerable code evaluates the value using Python eval() instead of treating it as data. The expression then executes in the context of the Python process running tqdm, allowing the attacker to run commands, read accessible files, alter outputs, or launch child processes. Because exploitation is local and requires interaction or control over invocation parameters, remote exploitation is not expected unless another system component exposes tqdm CLI arguments to untrusted users.
How to fix it
Upgrade tqdm to release version 4.66.3 or later. For source deployments from the tqdm Git repository, ensure the code includes fixed commit 4e613f84ed2ae029559f539464df83fa91feb316 or a later revision. Update direct and transitive dependency pins in requirements.txt, pyproject.toml, poetry.lock, Pipfile.lock, conda environment files, Dockerfiles, and build images. Rebuild and redeploy containers or virtual environments that vendor or cache Python packages. There are no known safe workarounds for affected versions; if immediate upgrade is not possible, avoid using the tqdm CLI with any untrusted argument values and remove or restrict wrappers that pass user-controlled data to --delim, --buf-size, --manpath, or other optional non-boolean CLI arguments.
How to confirm the fix worked
Confirm installed tqdm versions are 4.66.3 or later across developer systems, CI images, containers, virtual environments, and production automation hosts. Use package inventory tools or commands such as python -m pip show tqdm, pip freeze, poetry show tqdm, conda list tqdm, or software composition analysis results. For source checkouts, verify that commit 4e613f84ed2ae029559f539464df83fa91feb316 or later is present. Review lockfiles and container image SBOMs to ensure no affected tqdm versions remain. Where feasible, test representative tqdm CLI invocations after upgrade to confirm expected functionality and that optional argument values are treated as data rather than evaluated code.
Typical attack path
- Identify a host, script, pipeline, or job that invokes the tqdm CLI from an affected version.
- Gain the ability to influence tqdm command-line arguments, such as through a wrapper script, copied command, job parameter, local shell access, or untrusted automation input.
- Place a Python expression in an optional non-boolean tqdm CLI argument such as --delim, --buf-size, or --manpath.
- Trigger execution of the tqdm command.
- The vulnerable tqdm argument parser evaluates the supplied value with Python eval().
- Attacker-controlled code runs with the privileges and filesystem/network access of the invoking user or service account.
- The attacker uses that access to read secrets, modify outputs, spawn child processes, or establish further local persistence.
How to detect it
To determine whether exploitation already occurred, focus on places where tqdm is invoked as a command-line tool: shell history, terminal audit logs, CI/CD job logs, build logs, cron/systemd timers, EDR process telemetry, command-line logging, and container runtime logs. Look for tqdm commands using optional non-boolean arguments with Python expressions, imports, command execution functions, shell metacharacters, encoded payloads, or network/file access logic. In EDR data, hunt for python, python3, or tqdm processes spawning unusual child processes such as sh, bash, zsh, curl, wget, nc, ncat, powershell, cmd.exe, or python interpreters. Review timestamps of suspicious tqdm executions alongside file modifications, credential access, outbound network connections, and unexpected artifacts in temporary directories or workspace folders. There are no widely reported public threat actors or KEV-driven exploitation campaigns for this issue, so detection should be based on local command-line and process behavior rather than fixed external infrastructure indicators.
- tqdm --delim __import__
- tqdm --buf-size __import__
- tqdm --manpath __import__
- tqdm --delim eval(
- tqdm --buf-size eval(
- tqdm --manpath eval(
- tqdm --delim exec(
- tqdm --buf-size exec(
- tqdm --manpath exec(
- tqdm --delim os.system
- tqdm --buf-size os.system
- tqdm --manpath os.system
- tqdm --delim subprocess
- tqdm --buf-size subprocess
- tqdm --manpath subprocess
- tqdm --delim popen
- tqdm --buf-size popen
- tqdm --manpath popen
- tqdm --delim socket
- tqdm --buf-size socket
- tqdm --manpath socket
- tqdm --delim base64
- tqdm --buf-size base64
- tqdm --manpath base64
- python -m tqdm --delim __import__
- python -m tqdm --buf-size __import__
- python -m tqdm --manpath __import__
- python3 -m tqdm --delim __import__
- python3 -m tqdm --buf-size __import__
- python3 -m tqdm --manpath __import__
- python -m pip show tqdm
- tqdm==4.66.2
- tqdm==4.66.1
- tqdm==4.66.0
What your security team should do
- Upgrade all direct and transitive tqdm installations to 4.66.3 or later, prioritizing CI/CD runners, build images, shared data-processing hosts, developer workstations, and automation environments.
- Search source repositories, scripts, workflow definitions, and job templates for tqdm CLI usage with --delim, --buf-size, --manpath, or dynamically constructed tqdm arguments.
- Block or refactor patterns where untrusted user input is passed directly into tqdm command-line options.
- Regenerate lockfiles and rebuild container images to remove cached vulnerable package versions.
- Add SCA policy checks to prevent reintroduction of tqdm versions older than 4.66.3.
- Review process execution and shell history logs for suspicious tqdm invocations, especially those containing Python execution primitives or child process launches.
- Because this is not listed in KEV and has low EPSS, handle as a targeted dependency remediation item rather than an emergency internet-facing incident unless local evidence of suspicious usage exists.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | tqdm | 4.4.0 | 4.66.3 |
| Chainguard | checkov | 0 | 3.0.34-r1 |
| Chainguard | katib-cert-generator | 0 | 0.16.0-r9 |
| Chainguard | katib-cert-generator-compat | 0 | 0.16.0-r9 |
| Chainguard | katib-controller | 0 | 0.16.0-r9 |
| Chainguard | katib-controller-compat | 0 | 0.16.0-r9 |
| Chainguard | katib-db-manager | 0 | 0.16.0-r9 |
| Chainguard | katib-db-manager-compat | 0 | 0.16.0-r9 |
| Chainguard | katib-earlystopping | 0 | 0.16.0-r9 |
| Chainguard | katib-file-metricscollector | 0 | 0.16.0-r9 |
| Chainguard | katib-file-metricscollector-compat | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-goptuna | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-goptuna-compat | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-hyperband | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-hyperopt | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-nas-darts | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-nas-enas | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-optuna-enas | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-pbt-enas | 0 | 0.16.0-r9 |
| Chainguard | katib-suggestion-skopt-enas | 0 | 0.16.0-r9 |
| Chainguard | katib-tfevent-metricscollector | 0 | 0.16.0-r9 |
| Chainguard | kubeflow-katib | 0 | 0.16.0-r9 |
| Chainguard | nemo | 0 | 1.23.0-r12 |
| Chainguard | py3-supported-tqdm | 0 | 4.66.4-r0 |
| Chainguard | py3-tqdm | 0 | 4.66.4-r0 |
| Chainguard | py3.10-tqdm | 0 | 4.66.4-r0 |
| Chainguard | py3.10-tqdm-bin | 0 | 4.66.4-r0 |
| Chainguard | py3.11-tqdm | 0 | 4.66.4-r0 |
| Chainguard | py3.11-tqdm-bin | 0 | 4.66.4-r0 |
| Chainguard | py3.12-tqdm | 0 | 4.66.4-r0 |
| Chainguard | py3.12-tqdm-bin | 0 | 4.66.4-r0 |
| Chainguard | py3.13-tqdm | 0 | 4.66.4-r0 |
| Chainguard | py3.13-tqdm-bin | 0 | 4.66.4-r0 |
| Debian:11 | tqdm | 0 | No fix |
| Debian:12 | tqdm | 0 | No fix |
| Debian:13 | tqdm | 0 | 4.66.4-1 |
| Mageia:9 | python-tqdm | 0 | 4.64.1-2.1.mga9 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP5 | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| Ubuntu:20.04:LTS | tqdm | 0 | 4.30.0-1 |
| Ubuntu:22.04:LTS | tqdm | 0 | No fix |
| Ubuntu:24.04:LTS | tqdm | 0 | No fix |
| Ubuntu:24.10 | tqdm | 0 | 4.66.5-1 |
| Ubuntu:Pro:22.04:LTS | tqdm | 0 | 4.57.0-2ubuntu0.1~esm2 |
| Ubuntu:Pro:24.04:LTS | tqdm | 0 | 4.66.2-2ubuntu0.1~esm1 |
| Wolfi | checkov | 0 | 3.0.34-r1 |
| Wolfi | katib-cert-generator | 0 | 0.16.0-r9 |
| Wolfi | katib-cert-generator-compat | 0 | 0.16.0-r9 |
| Wolfi | katib-controller | 0 | 0.16.0-r9 |
| Wolfi | katib-controller-compat | 0 | 0.16.0-r9 |
| Wolfi | katib-db-manager | 0 | 0.16.0-r9 |
| Wolfi | katib-db-manager-compat | 0 | 0.16.0-r9 |
| Wolfi | katib-earlystopping | 0 | 0.16.0-r9 |
| Wolfi | katib-file-metricscollector | 0 | 0.16.0-r9 |
| Wolfi | katib-file-metricscollector-compat | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-goptuna | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-goptuna-compat | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-hyperband | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-hyperopt | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-nas-darts | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-nas-enas | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-optuna-enas | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-pbt-enas | 0 | 0.16.0-r9 |
| Wolfi | katib-suggestion-skopt-enas | 0 | 0.16.0-r9 |
| Wolfi | katib-tfevent-metricscollector | 0 | 0.16.0-r9 |
| Wolfi | kubeflow-katib | 0 | 0.16.0-r9 |
| Wolfi | py3-supported-tqdm | 0 | 4.66.4-r0 |
| Wolfi | py3-tqdm | 0 | 4.66.4-r0 |
| Wolfi | py3.10-tqdm | 0 | 4.66.4-r0 |
| Wolfi | py3.10-tqdm-bin | 0 | 4.66.4-r0 |
| Wolfi | py3.11-tqdm | 0 | 4.66.4-r0 |
| Wolfi | py3.11-tqdm-bin | 0 | 4.66.4-r0 |
| Wolfi | py3.12-tqdm | 0 | 4.66.4-r0 |
| Wolfi | py3.12-tqdm-bin | 0 | 4.66.4-r0 |
| Wolfi | py3.13-tqdm | 0 | 4.66.4-r0 |
| Wolfi | py3.13-tqdm-bin | 0 | 4.66.4-r0 |
| openSUSE:Leap 15.5 | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| openSUSE:Leap 15.6 | python-tqdm | 0 | 4.66.4-150400.9.12.1 |
| pypi | tqdm | 4.4.0 | No fix |
Related vulnerabilities
- CVE-2026-34519 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov
- CVE-2026-34525 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov
- CVE-2026-34518 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov
- CVE-2026-34520 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov
- CVE-2026-34514 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov
- CVE-2026-34516 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov
- CVE-2026-34517 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov
- CVE-2026-34513 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Also affects checkov