Skip to content
CriticalVulnerability

GHSA-gm8q-m8mv-jj5m: Unstructured has Path Traversal via Malicious MSG Attachment that Allows Arbitrary File Write

Published
Record updated
View JSON
Affected
  • unstructured <= 0.18.17
Fixed in
0.18.18
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.7%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

A path traversal flaw in the `partition_msg` function of Unstructured lets a crafted MSG file with attachment filenames containing sequences like `../../../etc/cron.d/malicious` write attachments to attacker-chosen paths when `process_attachments=True` is enabled. The source says this can lead to arbitrary file overwrite, remote code execution via overwritten configuration files, cron jobs or Python packages, data corruption, and denial of service. The library does not sanitize attachment filenames before file write operations.

Mitigation

Until patched, set `process_attachments=False` when processing untrusted MSG files, avoid processing MSG files from untrusted sources, or implement additional filename validation before processing.