CVE-2007-4559: Path Traversal

Published Aug 24, 2007
·
Updated

A flaw was found in the Python tarfile module. Extracting a crafted TAR archive with the tarfile.extract or tarfile.extractall functions could lead to a directory traversal vulnerability, resulting in overwrite of arbitrary files.

Other sources

Common Vulnerabilities and Exposures assigned an identifier CVE-2007-4559 to the following vulnerability:

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.

References:

Issue and additional attack vectors were discussed in following thread on python-dev mailinglist:

http://mail.python.org/pipermail/python-dev/2007-August/074290.html

Upstream bug tracking possible fixes for the issue:

http://bugs.python.org/issue1044

Red Hat

Python could allow a remote attacker to traverse directories on the system, caused by a vulnerability in the tarfile module. By persuading a victim to open a specially-crafted .TAR file containing "dot dot" sequences (/../) in the filename, a remote attacker could exploit this vulnerability to overwrite arbitrary files on the system with the victim's privileges.

IBM

Affected Software

20 affected componentsFixes available
redhat/python3.11-pip<0:22.3.1-4.el8
0:22.3.1-4.el8
redhat/python3.11<0:3.11.5-1.el8_9
0:3.11.5-1.el8_9
redhat/python3<0:3.6.8-56.el8_9
0:3.6.8-56.el8_9
redhat/python-pip<0:9.0.3-23.el8
0:9.0.3-23.el8
redhat/python-pip<0:9.0.3-22.1.el8_6
0:9.0.3-22.1.el8_6
redhat/python3<0:3.6.8-47.el8_6.4
0:3.6.8-47.el8_6.4
redhat/python-pip<0:9.0.3-22.1.el8_8
0:9.0.3-22.1.el8_8
redhat/python3.11-pip<0:22.3.1-4.el9
0:22.3.1-4.el9
redhat/python3.11<0:3.11.5-1.el9_3
0:3.11.5-1.el9_3
redhat/python3.9<0:3.9.18-1.el9_3
0:3.9.18-1.el9_3
redhat/python-pip<0:21.2.3-7.el9
0:21.2.3-7.el9
redhat/rh-python38-python<0:3.8.18-2.el7
0:3.8.18-2.el7
redhat/rh-python38-python-pip<0:19.3.1-4.el7
0:19.3.1-4.el7
Python Software Foundation Python
Python Python<3.6.16
Python Python>=3.7.0<3.8.17
Python Python>=3.9.0<3.9.17
Python Python>=3.10.0<3.10.12
Python Python>=3.11.0<3.11.4
IBM QRadar SIEM<=7.5 - 7.5.0 UP8 IF01

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/python3.11-pip to a version that resolves this vulnerability.

    Fixed in 0:22.3.1-4.el8
  2. Upgrade

    Upgrade redhat/python3.11 to a version that resolves this vulnerability.

    Fixed in 0:3.11.5-1.el8_9
  3. Upgrade

    Upgrade redhat/python3 to a version that resolves this vulnerability.

    Fixed in 0:3.6.8-56.el8_9
  4. Upgrade

    Upgrade redhat/python-pip to a version that resolves this vulnerability.

    Fixed in 0:9.0.3-23.el8
  5. Upgrade

    Upgrade redhat/python-pip to a version that resolves this vulnerability.

    Fixed in 0:9.0.3-22.1.el8_6
  6. Upgrade

    Upgrade redhat/python3 to a version that resolves this vulnerability.

    Fixed in 0:3.6.8-47.el8_6.4
  7. Upgrade

    Upgrade redhat/python-pip to a version that resolves this vulnerability.

    Fixed in 0:9.0.3-22.1.el8_8
  8. Upgrade

    Upgrade redhat/python3.11-pip to a version that resolves this vulnerability.

    Fixed in 0:22.3.1-4.el9
  9. Upgrade

    Upgrade redhat/python3.11 to a version that resolves this vulnerability.

    Fixed in 0:3.11.5-1.el9_3
  10. Upgrade

    Upgrade redhat/python3.9 to a version that resolves this vulnerability.

    Fixed in 0:3.9.18-1.el9_3
  11. Upgrade

    Upgrade redhat/python-pip to a version that resolves this vulnerability.

    Fixed in 0:21.2.3-7.el9
  12. Upgrade

    Upgrade redhat/rh-python38-python to a version that resolves this vulnerability.

    Fixed in 0:3.8.18-2.el7
  13. Upgrade

    Upgrade redhat/rh-python38-python-pip to a version that resolves this vulnerability.

    Fixed in 0:19.3.1-4.el7
  14. Compensating control

    Do not extract archives from untrusted sources with the Python tarfile module.

  15. Compensating control

    Add sanity checks when calling tarfile.extract or tarfile.extractall to validate and sanitize member filenames (e.g., reject names containing '..' or absolute paths) before extraction.

Event History

Aug 24, 2007
CVE Published
via Red Hat·12:00 AM
Aug 28, 2007
Data Sourced
via NVD·01:17 AM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·04:00 AM
Data Sourced
via MITRE·04:00 AM
Description
Aug 29, 2007
Data Sourced
via Red Hat·01:17 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2007-4559?

CVE-2007-4559 is a vulnerability that allows user-assisted remote attackers to overwrite arbitrary files via a directory traversal attack in the Python tarfile module.

2

What software is affected by CVE-2007-4559?

Python Software Foundation Python and Python Python versions up to 3.11.4 are affected by CVE-2007-4559.

3

What is the severity of CVE-2007-4559?

CVE-2007-4559 has a severity score of 6.8, which is considered medium.

4

How do I fix CVE-2007-4559?

To fix CVE-2007-4559, update to a version of Python Software Foundation Python or Python Python that is not affected by the vulnerability.

5

Where can I find more information about CVE-2007-4559?

You can find more information about CVE-2007-4559 at the following references: [1] [2] [3]

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203