unstructured
Affected
- introduced
0, fixed0.18.18(ecosystem)
Fixed versions
0.18.18
Fix
- Fixed version
0.18.18pip install --upgrade unstructured==0.18.18
Advisory
Also known as: CVE-2025-64712, GHSA-gm8q-m8mv-jj5m
Unstructured has Path Traversal via Malicious MSG Attachment that Allows Arbitrary File Write
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:
## 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:
process_attachments=False when processing untrusted MSG filesCritical Basis: CVSS v3 score 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
0, fixed 0.18.18 (ecosystem)0.18.18
0.18.18pip install --upgrade unstructured==0.18.18Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: PyPA Advisory Database · CC BY 4.0