CVE-2024-6232
High · 7.5CVSS
7.5
EPSS
2.2%
Published
Sep 3, 2024
CISA due date
—
Cloudanix analysis
A problem in the Python programming language can make programs that handle certain archive files slow down or stop working when they receive specially designed files.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
ReDoS condition in tarfile.TarFile header parsing regexes permits catastrophic backtracking on crafted archives, consuming excessive CPU and potentially leading to denial of service.
Why it matters to the business
Services or applications that extract or inspect tar archives can become unresponsive or consume high resources, disrupting operations and availability until the workload is terminated.
How an attack unfolds
An attacker supplies a maliciously crafted tar archive containing input engineered to trigger excessive regex backtracking; when the vulnerable tarfile module parses the header, CPU usage spikes and the process may hang or be terminated by resource limits.
How to fix it
Upgrade python/cpython to the commit 34ddb64d088dd7ccc321f6103d23153256caa5d4 or later releases that contain the fix; rebuild and redeploy any affected Python environments or containers.
How to confirm the fix worked
Confirm the installed Python version or source tree contains commit 34ddb64d088dd7ccc321f6103d23153256caa5d4; test header parsing against known ReDoS tar samples and monitor for bounded CPU and timely completion.
Typical attack path
- Identify target application or service that uses Python's tarfile module to open untrusted archives
- Generate tar archive with header data crafted to cause catastrophic backtracking in the vulnerable regex
- Deliver the archive via upload, download, or file system path processed by the application
- Trigger parsing of the archive header, causing sustained high CPU consumption or process hang
How to detect it
Monitor for Python processes exhibiting sustained high CPU while parsing tar archives; inspect application logs for tarfile usage and correlate with incoming archive files from untrusted sources.
What your security team should do
- Prioritize upgrade of all Python runtimes to the fixed commit before processing untrusted tar archives
- Add runtime resource limits and timeouts around tarfile operations as a temporary control
- Review logs and monitoring for unexpected high-CPU Python processes handling archive files
The record
There is a MEDIUM severity vulnerability affecting CPython. Regular expressions that allowed excessive backtracking during tarfile.TarFile header parsing are vulnerable to ReDoS via specifically-crafted tar archives.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | platform-python | 0 | 3.6.8-67.el8_10.alma.1 |
| AlmaLinux:8 | platform-python-debug | 0 | 3.6.8-67.el8_10.alma.1 |
| AlmaLinux:8 | platform-python-devel | 0 | 3.6.8-67.el8_10.alma.1 |
| AlmaLinux:8 | python3-idle | 0 | 3.6.8-67.el8_10.alma.1 |
| AlmaLinux:8 | python3-libs | 0 | 3.6.8-67.el8_10.alma.1 |
| AlmaLinux:8 | python3-test | 0 | 3.6.8-67.el8_10.alma.1 |
| AlmaLinux:8 | python3-tkinter | 0 | 3.6.8-67.el8_10.alma.1 |
| AlmaLinux:8 | python3.11 | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.11-debug | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.11-devel | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.11-idle | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.11-libs | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.11-rpm-macros | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.11-test | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.11-tkinter | 0 | 3.11.10-1.el8_10 |
| AlmaLinux:8 | python3.12 | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python3.12-debug | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python3.12-devel | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python3.12-idle | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python3.12-libs | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python3.12-rpm-macros | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python3.12-test | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python3.12-tkinter | 0 | 3.12.6-1.el8_10 |
| AlmaLinux:8 | python39 | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-Cython | 0 | 0.29.21-5.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-Cython | 0 | 0.29.21-5.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-PyMySQL | 0 | 0.10.1-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-attrs | 0 | 20.3.0-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-cffi | 0 | 1.14.3-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-cffi | 0 | 1.14.3-2.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-chardet | 0 | 3.0.4-19.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-cryptography | 0 | 3.3.1-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-debug | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-devel | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-idle | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-idna | 0 | 2.10-4.module_el8.10.0+3849+a48d89aa |
| AlmaLinux:8 | python39-iniconfig | 0 | 1.1.1-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-libs | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-lxml | 0 | 4.6.5-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-lxml | 0 | 4.6.5-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-mod_wsgi | 0 | 4.7.1-7.module_el8.9.0+3634+fb2a896c |
| AlmaLinux:8 | python39-more-itertools | 0 | 8.5.0-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy | 0 | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy | 0 | 1.19.4-3.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-numpy-doc | 0 | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy-f2py | 0 | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy-f2py | 0 | 1.19.4-3.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-packaging | 0 | 20.4-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pip | 0 | 20.2.4-9.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-pip-wheel | 0 | 20.2.4-9.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-pluggy | 0 | 0.13.1-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-ply | 0 | 3.11-10.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-psutil | 0 | 5.8.0-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-psutil | 0 | 5.8.0-4.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-psycopg2 | 0 | 2.8.6-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-psycopg2-doc | 0 | 2.8.6-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-psycopg2-tests | 0 | 2.8.6-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-py | 0 | 1.10.0-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pybind11 | 0 | 2.7.1-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pybind11 | 0 | 2.7.1-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-pybind11-devel | 0 | 2.7.1-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pybind11-devel | 0 | 2.7.1-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-pycparser | 0 | 2.20-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pyparsing | 0 | 2.4.7-5.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pysocks | 0 | 1.7.1-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pytest | 0 | 6.0.2-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pyyaml | 0 | 5.4.1-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pyyaml | 0 | 5.4.1-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-requests | 0 | 2.25.0-3.module_el8.9.0+3634+fb2a896c |
| AlmaLinux:8 | python39-rpm-macros | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-scipy | 0 | 1.5.4-5.module_el8.9.0+3634+fb2a896c |
| AlmaLinux:8 | python39-setuptools | 0 | 50.3.2-6.module_el8.10.0+3885+d986a391 |
| AlmaLinux:8 | python39-setuptools-wheel | 0 | 50.3.2-6.module_el8.10.0+3885+d986a391 |
| AlmaLinux:8 | python39-six | 0 | 1.15.0-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-test | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-tkinter | 0 | 3.9.20-1.module_el8.10.0+3902+1690be06 |
| AlmaLinux:8 | python39-toml | 0 | 0.10.1-5.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-urllib3 | 0 | 1.25.10-5.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-wcwidth | 0 | 0.2.5-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-wheel | 0 | 1:0.35.1-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-wheel-wheel | 0 | 1:0.35.1-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:9 | python-unversioned-command | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python-unversioned-command | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3 | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python3 | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3-debug | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python3-debug | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3-devel | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python3-devel | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3-idle | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python3-idle | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3-libs | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python3-libs | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3-test | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python3-test | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3-tkinter | 0 | 3.9.18-3.el9_4.6 |
| AlmaLinux:9 | python3-tkinter | 0 | 3.9.19-8.el9_5.1 |
| AlmaLinux:9 | python3.11 | 0 | 3.11.7-1.el9_4.6 |
| AlmaLinux:9 | python3.11 | 0 | 3.11.9-7.el9_5.1 |
| AlmaLinux:9 | python3.11-debug | 0 | 3.11.7-1.el9_4.6 |
| AlmaLinux:9 | python3.11-debug | 0 | 3.11.9-7.el9_5.1 |
| AlmaLinux:9 | python3.11-devel | 0 | 3.11.7-1.el9_4.6 |
| AlmaLinux:9 | python3.11-devel | 0 | 3.11.9-7.el9_5.1 |
| AlmaLinux:9 | python3.11-idle | 0 | 3.11.7-1.el9_4.6 |
| AlmaLinux:9 | python3.11-idle | 0 | 3.11.9-7.el9_5.1 |
| AlmaLinux:9 | python3.11-libs | 0 | 3.11.7-1.el9_4.6 |
| AlmaLinux:9 | python3.11-libs | 0 | 3.11.9-7.el9_5.1 |
| AlmaLinux:9 | python3.11-test | 0 | 3.11.7-1.el9_4.6 |
| AlmaLinux:9 | python3.11-test | 0 | 3.11.9-7.el9_5.1 |
| AlmaLinux:9 | python3.11-tkinter | 0 | 3.11.7-1.el9_4.6 |
| AlmaLinux:9 | python3.11-tkinter | 0 | 3.11.9-7.el9_5.1 |
| AlmaLinux:9 | python3.12 | 0 | 3.12.1-4.el9_4.4 |
| AlmaLinux:9 | python3.12 | 0 | 3.12.5-2.el9_5.1 |
| AlmaLinux:9 | python3.12-debug | 0 | 3.12.1-4.el9_4.4 |
| AlmaLinux:9 | python3.12-debug | 0 | 3.12.5-2.el9_5.1 |
| AlmaLinux:9 | python3.12-devel | 0 | 3.12.1-4.el9_4.4 |
| AlmaLinux:9 | python3.12-devel | 0 | 3.12.5-2.el9_5.1 |
| AlmaLinux:9 | python3.12-idle | 0 | 3.12.1-4.el9_4.4 |
| AlmaLinux:9 | python3.12-idle | 0 | 3.12.5-2.el9_5.1 |
| AlmaLinux:9 | python3.12-libs | 0 | 3.12.1-4.el9_4.4 |
| AlmaLinux:9 | python3.12-libs | 0 | 3.12.5-2.el9_5.1 |
| AlmaLinux:9 | python3.12-test | 0 | 3.12.1-4.el9_4.4 |
| AlmaLinux:9 | python3.12-test | 0 | 3.12.5-2.el9_5.1 |
| AlmaLinux:9 | python3.12-tkinter | 0 | 3.12.1-4.el9_4.4 |
| AlmaLinux:9 | python3.12-tkinter | 0 | 3.12.5-2.el9_5.1 |
| Alpine:v3.17 | python3 | 0 | 3.10.15-r0 |
| Alpine:v3.18 | python3 | 0 | 3.11.10-r0 |
| Alpine:v3.19 | python3 | 0 | 3.11.10-r0 |
| Alpine:v3.20 | python3 | 0 | 3.12.6-r0 |
| Alpine:v3.21 | python3 | 0 | 3.12.6-r0 |
| Alpine:v3.22 | python3 | 0 | 3.12.6-r0 |
| Bitnami | libpython | 0 | 3.8.20 |
| Bitnami | python | 0 | 3.8.20 |
| Bitnami | python | 3.12.0 | 3.12.6 |
| Bitnami | python-min | 0 | 3.8.20 |
| Bitnami | python-min | 3.12.0 | 3.12.6 |
| Chainguard | python-3.10 | 0 | 3.10.15-r0 |
| Chainguard | python-3.10-base | 0 | 3.10.15-r0 |
| Chainguard | python-3.10-base-dev | 0 | 3.10.15-r0 |
| Chainguard | python-3.10-dev | 0 | 3.10.15-r0 |
| Chainguard | python-3.10-doc | 0 | 3.10.15-r0 |
| Chainguard | python-3.11 | 0 | 3.11.9-r9 |
| Chainguard | python-3.11-base | 0 | 3.11.9-r9 |
| Chainguard | python-3.11-base-dev | 0 | 3.11.9-r9 |
| Chainguard | python-3.11-dev | 0 | 3.11.9-r9 |
| Chainguard | python-3.11-doc | 0 | 3.11.9-r9 |
| Chainguard | python-3.12 | 0 | 3.12.5-r3 |
| Chainguard | python-3.12-base | 0 | 3.12.5-r3 |
| Chainguard | python-3.12-base-dev | 0 | 3.12.5-r3 |
| Chainguard | python-3.12-dev | 0 | 3.12.5-r3 |
| Chainguard | python-3.12-doc | 0 | 3.12.5-r3 |
| Chainguard | python-3.12-privileged-netbindservice | 0 | 3.12.5-r3 |
| Chainguard | python-3.12-tk | 0 | 3.12.5-r3 |
| Chainguard | python-3.13 | 0 | 3.13.2-r6 |
| Chainguard | python-3.13-base | 0 | 3.13.2-r6 |
| Chainguard | python-3.13-base-dev | 0 | 3.13.2-r6 |
| Chainguard | python-3.13-dev | 0 | 3.13.2-r6 |
| Chainguard | python-3.13-doc | 0 | 3.13.2-r6 |
| Chainguard | python-3.13-privileged-netbindservice | 0 | 3.13.2-r6 |
| Chainguard | python-3.13-tk | 0 | 3.13.2-r6 |
| Chainguard | python-3.8 | 0 | 3.8.20-r0 |
| Chainguard | python-3.8-base | 0 | 3.8.20-r0 |
| Chainguard | python-3.8-base-dev | 0 | 3.8.20-r0 |
| Chainguard | python-3.8-default | 0 | 3.8.20-r0 |
| Chainguard | python-3.8-dev | 0 | 3.8.20-r0 |
| Chainguard | python-3.8-doc | 0 | 3.8.20-r0 |
| Chainguard | python-3.9 | 0 | 3.9.20-r0 |
| Chainguard | python-3.9-base | 0 | 3.9.20-r0 |
| Chainguard | python-3.9-base-dev | 0 | 3.9.20-r0 |
| Chainguard | python-3.9-default | 0 | 3.9.20-r0 |
| Chainguard | python-3.9-dev | 0 | 3.9.20-r0 |
| Chainguard | python-3.9-doc | 0 | 3.9.20-r0 |
| Debian:11 | pypy3 | 0 | No fix |
| Debian:11 | python2.7 | 0 | No fix |
| Debian:11 | python3.9 | 0 | No fix |
| Debian:11 | python3.9 | 0 | 3.9.2-1+deb11u2 |
| Debian:12 | pypy3 | 0 | No fix |
| Debian:12 | python3.11 | 0 | No fix |
| Debian:13 | pypy3 | 0 | 7.3.18+dfsg-1 |
| Debian:13 | python3.12 | 0 | 3.12.6-1 |
| Debian:13 | python3.13 | 0 | 3.13.0~rc2-1 |
| Mageia:9 | python3 | 0 | 3.10.11-1.3.mga9 |
| Red Hat:enterprise_linux:8::appstream | PyYAML | 0 | 0:5.4.1-1.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | PyYAML-debugsource | 0 | 0:5.4.1-1.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | mod_wsgi | 0 | 0:4.7.1-7.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | numpy | 0 | 0:1.19.4-3.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | numpy-debugsource | 0 | 0:1.19.4-3.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | platform-python | 0 | 0:3.6.8-67.el8_10 |
| Red Hat:enterprise_linux:8::appstream | platform-python-debug | 0 | 0:3.6.8-67.el8_10 |
| Red Hat:enterprise_linux:8::appstream | platform-python-devel | 0 | 0:3.6.8-67.el8_10 |
| Red Hat:enterprise_linux:8::appstream | python-PyMySQL | 0 | 0:0.10.1-2.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | python-cffi | 0 | 0:1.14.3-2.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | python-cffi-debugsource | 0 | 0:1.14.3-2.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | python-chardet | 0 | 0:3.0.4-19.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | python-cryptography | 0 | 0:3.3.1-3.module+el8.10.0+21271+eccd1d86 |
| Red Hat:enterprise_linux:8::appstream | python-cryptography-debugsource | 0 | 0:3.3.1-3.module+el8.10.0+21271+eccd1d86 |
| Red Hat:enterprise_linux:8::appstream | python-idna | 0 | 0:2.10-4.module+el8.10.0+21815+bb024982 |
| Red Hat:enterprise_linux:8::appstream | python-lxml | 0 | 0:4.6.5-1.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | python-lxml-debugsource | 0 | 0:4.6.5-1.module+el8.9.0+19644+d68f775d |
| Red Hat:enterprise_linux:8::appstream | python-ply | 0 | 0:3.11-10.module+el8.9.0+19644+d68f775d |
Related vulnerabilities
- CVE-2024-11168 The urllib.parse.urlsplit() and urlparse() functions improperly validated bracketed hosts… Also affects platform-python
- CVE-2024-9287 A vulnerability has been found in the CPython `venv` module and CLI where path names… Also affects platform-python
- CVE-2024-6923 There is a MEDIUM severity vulnerability affecting CPython. Also affects platform-python
- CVE-2024-4032 The “ipaddress” module contained incorrect information about whether certain IPv4 and… Also affects platform-python
- CVE-2024-0450 An issue was found in the CPython `zipfile` module affecting versions 3.12.1, 3.11.7… Also affects platform-python
- CVE-2023-6597 An issue was found in the CPython `tempfile.TemporaryDirectory` class affecting versions… Also affects platform-python
- CVE-2023-27043 The email module of Python through 3.11.3 incorrectly parses e-mail addresses that… Also affects platform-python
- CVE-2007-4559 Directory traversal vulnerability in the (1) extract and (2) extractall functions in the… Also affects platform-python