INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2025-64712

Unstructured has Path Traversal via Malicious MSG Attachment that Allows Arbitrary File Write

CVE-2025-64712 ยท 2026-02-03 critical

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Path traversal and file access
Affected
unstructured (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.7% chance of exploitation in 30 days

How it works, in short

Traversal sequences in MSG attachment filenames make the partitioner write attachments outside the intended output directory. (Our summary, written by a model. The source text is below.)

Details

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: - Set process_attachments=False when processing untrusted MSG files - Avoid processing MSG files from untrusted sources - Implement additional filename validation before processing

References

Source: GitHub Advisory Database, used under CC BY 4.0.