CVE-2025-4517: Arbitrary writes via tarfile realpath overflow

Published Jun 3, 2025
·
Updated

Allows arbitrary filesystem writes outside the extraction directory during extraction with filter="data".

You are affected by this vulnerability if using the tarfile module to extract untrusted tar archives using TarFile.extractall() or TarFile.extract() using the filter= parameter with a value of "data" or "tar". See the tarfile extraction filters documentation

Other sources

Arbitrary writes via tarfile realpath overflow

Microsoft

Affected Software

11 affected componentsFixes available
pypi/tarfile>3.12
pypi/tarfile>=3.14
IBM Cloud Pak System<=2.3.4.0
IBM Cloud Pak System<=2.3.4.1 2.3.4.1 ifix1
IBM Cloud Pak System<=2.3.5.0
IBM Cloud Pak System<=2.3.6.0
IBM Os Image For Red Hat Linux Systems<=4.0.4.0 4.0.5.0 4.0.6.0 4.0.7.0
IBM Os Image For Red Hat Linux Systems<=5.0.0.0 5.0.1.0
Microsoft cbl2 python3 3.9.19-14
Microsoft azl3 python3 3.12.9-2
Microsoft cbl2 python3 3.9.19-13

Event History

Jun 3, 2025
CVE Published
via MITRE·12:58 PM
Data Sourced
via MITRE·12:58 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·02:01 PM
DescriptionSeverityAffected Software
Jul 11, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Jan 30, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

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 CVE-2025-4517?

CVE-2025-4517 is categorized as a high-severity vulnerability due to its ability to allow arbitrary filesystem writes.

2

How do I fix CVE-2025-4517?

To fix CVE-2025-4517, avoid using the TarFile.extractall() or TarFile.extract() methods with the filter parameter when handling untrusted tar archives.

3

Who is affected by CVE-2025-4517?

CVE-2025-4517 affects users of Python versions 3.12 and 3.14 that utilize the tarfile module to extract untrusted tar archives.

4

What is the exploitation vector for CVE-2025-4517?

CVE-2025-4517 can be exploited through untrusted tar files that are extracted using specific methods that do not validate paths properly.

5

Is there a workaround for CVE-2025-4517?

A potential workaround for CVE-2025-4517 is to validate and sanitize tar file contents before extraction to prevent unauthorized filesystem writes.

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