Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
Python Software Foundation CPython
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Python是Python基金会的一套开源的、面向对象的程序设计语言。该语言具有可扩展、支持模块和包、支持多种平台等特点。 Python 3.12及之后版本存在安全漏洞,该漏洞源于提取过滤器允许任意文件系统写入提取目录外。

CVSS 9.4 · Critical EPSS 1.43% · P72

Affected Version Matrix 6

VendorProduct Version RangeStatus
Python Software Foundation CPython < 3.9.23 affected
3.10.0< 3.10.18 affected
3.11.0< 3.11.13 affected
3.12.0< 3.12.11 affected
3.13.0< 3.13.4 affected
3.14.0a1< 3.14.0b3 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-4517

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Arbitrary writes via tarfile realpath overflow
Source: CVE Program / CVE List V5
Vulnerability Description
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 https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter  for more information. Note that for Python 3.14 or later the default value of filter= changed from "no filtering" to `"data", so if you are relying on this new default behavior then your usage is also affected. Note that none of these vulnerabilities significantly affect the installation of source distributions which are tar archives as source distributions already allow arbitrary code execution during the build process. However when evaluating source distributions it's important to avoid installing source distributions with suspicious links.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Source: CVE Program / CVE List V5
Vulnerability Type
对路径名的限制不恰当(路径遍历)
Source: CVE Program / CVE List V5
Vulnerability Title
Python 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Python是Python基金会的一套开源的、面向对象的程序设计语言。该语言具有可扩展、支持模块和包、支持多种平台等特点。 Python 3.12及之后版本存在安全漏洞,该漏洞源于提取过滤器允许任意文件系统写入提取目录外。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Shenlong Deep Dive — AI Deep Analysis

10-question deep dive: root cause, exploitation, mitigation, urgency. Read summary free, full version requires login.

Affected Products

Vendor Product Affected Versions CPE Subscribe
Python Software Foundation CPython 0 ~ 3.9.23 -

II. Public POCs for CVE-2025-4517

# POC Description Source Link Shenlong Link
1 CVE‑2025‑4517 Proof‑of‑Concept Script https://github.com/AnimePrincess420/CVE-2025-4517-PoC POC Details
2 CVE-2025-4517 (CVSS 9.4 – Critical) A vulnerability in Python's `tarfile` https://github.com/StealthByte0/CVE-2025-4517-poc POC Details
3 Python tarfile data filter bypass via PATH_MAX overflow in os.path.realpath() - CVE-2025-4517 / CVE-2025-4330 https://github.com/0xDTC/CVE-2025-4517-tarfile-PATH_MAX-bypass POC Details
4 Privilege Escalation script for Wingdata https://github.com/AzureADTrent/CVE-2025-4517-POC-HTB-WingData POC Details
5 A high-performance Python toolkit to automate the CVE-2025-4517 PATH_MAX bypass exploit. Specifically tuned for the WingData HTB challenge to achieve arbitrary file writes and root persistence https://github.com/Rohitberiwala/PyPath-Escape-CVE-2025-4517-Exploit-Research POC Details
6 PoC and explanation for CVE-2025-4517 used in a CTF I was playing. https://github.com/kerburenthusiasm/CVE-2025-4517-PoC POC Details
7 None https://github.com/ben-slates/CVE-2025-4517-POC-HTB-WINGDATA POC Details
8 Path traversal vulnerability in Python's tarfile. https://github.com/estebanzarate/CVE-2025-4517-Python-tarfile-filter-data-Bypass-PoC POC Details
9 None https://github.com/ben-slates/CVE-2025-4517-POC POC Details
AI-Generated POC Premium
Qwen3.6-35B-A3B · 9506 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2025-4517

请登录查看更多情报信息。

Patches & Fixes for CVE-2025-4517 (5)

Same Patch Batch · Python Software Foundation · 2025-06-03 · 5 CVEs total

CVE-2025-4138 7.5 HIGH Bypassing extraction filter to create symlinks to arbitrary targets outside extraction dir
CVE-2025-4330 7.5 HIGH Extraction filter bypass for linking outside extraction directory
CVE-2025-4435 7.5 HIGH Tarfile extracts filtered members when errorlevel=0
CVE-2024-12718 5.3 MEDIUM Bypass extraction filter to modify file metadata outside extraction directory

IV. Related Vulnerabilities

V. Comments for CVE-2025-4517

No comments yet


Leave a comment