PT-2026-6424 · Pypi · Unstructured
Published
2026-02-03
·
Updated
2026-02-03
CVSS v3.1
9.8
Critical
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
A Path Traversal vulnerability in the
partition msg function allows an attacker to write or overwrite arbitrary files on the filesystem when processing malicious MSG files with attachments.Impact
An attacker can craft a malicious .msg file with attachment filenames containing path traversal sequences (e.g.,
../../../etc/cron.d/malicious). When processed with process attachments=True, the library writes the attachment to an
attacker-controlled path, potentially leading to:- Arbitrary file overwrite
- Remote code execution (via overwriting configuration files, cron jobs, or Python packages)
- Data corruption
- Denial of service
Affected Functionality
The vulnerability affects the MSG file partitioning functionality when
process attachments=True is enabled.Vulnerability Details
The library does not sanitize attachment filenames in MSG files before using them in file write operations, allowing directory
traversal sequences to escape the intended output directory.
Workarounds
Until patched, users can:
- Set
process attachments=Falsewhen processing untrusted MSG files - Avoid processing MSG files from untrusted sources
- Implement additional filename validation before processing
Fix
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Unstructured