REDHAT-BUG-263261: Medium severity Python TarFile vulnerability

Published Aug 29, 2007
·
Updated

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

Affected Software

1 affected component
Python TarFile

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Do not call tarfile.extract or tarfile.extractall on TAR archives from untrusted or unauthenticated sources. Before extracting, validate and sanitize each member name to reject any paths containing '..' or absolute paths and ensure constructed target paths remain inside the intended destination directory.

    Python tarfile module use of extract/extractall = disabled for untrusted archives
  2. Compensating control

    Perform TAR extraction only in a restricted environment (unprivileged account, chroot, container, or sandbox) and restrict filesystem permissions for the extraction target to limit the impact of any path traversal overwrite.

  3. Operational

    Audit systems and recent extraction operations for unexpected file modifications or overwrites that could indicate exploitation via crafted TAR archives; restore affected files from trusted backups if needed.

  4. Operational

    Monitor the upstream bug tracker (bugs.python.org issue1044) and the referenced CVE (CVE-2007-4559) for available fixes or vendor patches and apply appropriate updates when they are released.

Event History

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 the severity of REDHAT-BUG-263261?

The severity of REDHAT-BUG-263261 is considered high due to the potential for remote code execution.

2

How do I fix REDHAT-BUG-263261?

To fix REDHAT-BUG-263261, ensure you update your Python tarfile module to the latest version that addresses this vulnerability.

3

What causes REDHAT-BUG-263261?

REDHAT-BUG-263261 is caused by a directory traversal vulnerability in the 'extract' and 'extractall' functions of the Python tarfile module.

4

Which versions of Python are affected by REDHAT-BUG-263261?

Specific versions of the Python tarfile module are affected, and you should check the security advisories for a complete list of vulnerable versions.

5

Is REDHAT-BUG-263261 related to CVE-2007-4559?

Yes, REDHAT-BUG-263261 is associated with CVE-2007-4559, which identifies the same directory traversal vulnerability.

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