CVE-2025-4517CWE-22path-traversal

CVE-2025-4517

Critical · published June 3, 2025

CVSS v3.1
9.4
EPSS
1%
Percentile
72.8
In the wild
Unconfirmed
What it is

🔥 A sneaky filesystem vulnerability lurks in the tarfile module, allowing untrusted tar archives to overwrite files outside the extraction directory! ⚡ Think of it like a delivery driver dropping off packages in anyone's backyard instead of the intended address. If you don't check the delivery logs, you could end up with a neighbor's mystery package inside your home! An attacker could potentially manipulate tar archives to write files all over your filesystem, leading to unauthorized access and data corruption. This could be absolutely devastating, as a malicious actor could replace crucial files or install backdoors while you’re none the wiser!

Put simply

Think of it like a delivery driver dropping off packages in anyone's backyard instead of the intended address. If you don't check the delivery logs, you could end up with a neighbor's mystery package inside your home! This critical vulnerability allows arbitrary filesystem writes when using TarFile.extractall() or TarFile.extract(), especially with the filter set to 'data', leading to files being written outside the specified extraction directory.

What to do

An attacker could potentially manipulate tar archives to write files all over your filesystem, leading to unauthorized access and data corruption. This could be absolutely devastating, as a malicious actor could replace crucial files or install backdoors while you’re none the wiser! To protect yourself, update your Python tarfile module to a version earlier than 3.14, or ensure that you explicitly set the filter to 'no filtering' when extracting untrusted archives. It’s also wise to sanitize the input and verify archive integrity! You've got this! Follow these steps, and you'll keep your filesystem safe and sound. 🛡️

The record
Technical detail
CVSS v3.1
9.4 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
CVSS v4.0
Not supplied
EPSS
0.01430 · 72.8th percentile
Weakness
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published
2025-06-03T17:15Z
References (12)
EPSS history
Timeline
  • 03 JUN 12:58Z
    Arbitrary writes via tarfile realpath overflow
    cvelistv5