CVE-2007-4559 Path traversal in n/a
Attackers can overwrite arbitrary files via directory traversal in Python's tarfile module, requiring user-assisted archive extraction.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2007-4559?
CVE-2007-4559 is a critical path traversal vulnerability in Python Python, published on 28 Aug 2007. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted remote attackers to overwrite arbitrary files via a .. (dot dot) sequence in filenames in a TAR archive, a related issue to CVE-2001-1267.
Weakness: CWE-22
Which versions are affected by CVE-2007-4559?
2 open source packages ship an affected version, including python and python-min. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
python Bitnami | All versions | 3.6.16, 3.8.17, 3.9.17, 3.10.12, 3.11.4 |
python-min Bitnami | All versions | 3.6.16, 3.8.17, 3.9.17, 3.10.12, 3.11.4 |
Linux distribution packages (38)
platform-python AlmaLinux:8 | All versions | 3.6.8-56.el8_9.alma.1 |
platform-python-debug AlmaLinux:8 | All versions | 3.6.8-56.el8_9.alma.1 |
platform-python-devel AlmaLinux:8 | All versions | 3.6.8-56.el8_9.alma.1 |
platform-python-pip AlmaLinux:8 | All versions | 9.0.3-23.el8 |
python3-idle AlmaLinux:8 | All versions | 3.6.8-56.el8_9.alma.1 |
python3-libs AlmaLinux:8 | All versions | 3.6.8-56.el8_9.alma.1 |
python3-pip AlmaLinux:8 | All versions | 9.0.3-23.el8 |
python3-pip-wheel AlmaLinux:8 | All versions | 9.0.3-23.el8 |
python3-test AlmaLinux:8 | All versions | 3.6.8-56.el8_9.alma.1 |
python3-tkinter AlmaLinux:8 | All versions | 3.6.8-56.el8_9.alma.1 |
python3.11-pip AlmaLinux:8 | All versions | 22.3.1-4.el8 |
python3.11-pip-wheel AlmaLinux:8 | All versions | 22.3.1-4.el8 |
python-unversioned-command AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3 AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3-debug AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3-devel AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3-idle AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3-libs AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3-pip AlmaLinux:9 | All versions | 21.2.3-7.el9 |
python3-pip-wheel AlmaLinux:9 | All versions | 21.2.3-7.el9 |
python3-test AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3-tkinter AlmaLinux:9 | All versions | 3.9.18-1.el9_3 |
python3.11-pip AlmaLinux:9 | All versions | 22.3.1-4.el9 |
python3.11-pip-wheel AlmaLinux:9 | All versions | 22.3.1-4.el9 |
platform-python Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
platform-python-debug Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
platform-python-devel Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
python3-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
python3-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
python3-idle Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
python3-pip Red Hat:enterprise_linux:8::appstream | All versions | 0:9.0.3-23.el8 |
python3-test Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
python3-tkinter Red Hat:enterprise_linux:8::appstream | All versions | 0:3.6.8-56.el8_9 |
python3.11-pip Red Hat:enterprise_linux:8::appstream | All versions | 0:22.3.1-4.el8 |
python3.11-pip-wheel Red Hat:enterprise_linux:8::appstream | All versions | 0:22.3.1-4.el8 |
platform-python Red Hat:enterprise_linux:8::baseos | All versions | 0:3.6.8-56.el8_9 |
platform-python-pip Red Hat:enterprise_linux:8::baseos | All versions | 0:9.0.3-23.el8 |
python-pip Red Hat:enterprise_linux:8::baseos | All versions | 0:9.0.3-23.el8 |
Products include Python Python.
How do I fix CVE-2007-4559?
Upgrade python to a fixed version for your release line: 3.6.16, 3.8.17, 3.9.17 or 3.10.12.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2007-4559 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2007-4559 exists.
Public exploit code: 7 proofs of concept on GitHub.
Other vulnerabilities in Python Python
Sources
Also known as ALSA-2023:6324, ALSA-2023:6659, ALSA-2023:6694, ALSA-2023:6914, ALSA-2023:7151, ALSA-2023:7176 and 41 more.