{"id":"CVE-2025-64712","aliases":["CVE-2025-64712","GHSA-gm8q-m8mv-jj5m","PYSEC-2026-558"],"related":[],"kind":"vulnerability","state":"published","title":"Unstructured has Path Traversal via Malicious MSG Attachment that Allows Arbitrary File Write","summary":"The unstructured library provides open-source components for ingesting and pre-processing images and text documents, such as PDFs, HTML, Word docs, and many more. Prior to version 0.18.18, 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. This issue has been patched in version 0.18.18.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The unstructured library provides open-source components for ingesting and pre-processing images and text documents, such as PDFs, HTML, Word docs, and many more. Prior to version 0.18.18, 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. This issue has been patched in version 0.18.18.","source":"cvelist"},{"lang":"en","text":"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.\n\n  ## Impact\n  An attacker can craft a malicious .msg file with attachment filenames containing path traversal sequences (e.g.,\n  `../../../etc/cron.d/malicious`). When processed with `process_attachments=True`, the library writes the attachment to an\n  attacker-controlled path, potentially leading to:\n\n  - Arbitrary file overwrite\n  - Remote code execution (via overwriting configuration files, cron jobs, or Python packages)\n  - Data corruption\n  - Denial of service\n\n  ## Affected Functionality\n  The vulnerability affects the MSG file partitioning functionality when `process_attachments=True` is enabled.\n\n  ## Vulnerability Details\n  The library does not sanitize attachment filenames in MSG files before using them in file write operations, allowing directory\n  traversal sequences to escape the intended output directory.\n\n  ## Workarounds\n  Until patched, users can:\n  - Set `process_attachments=False` when processing untrusted MSG files\n  - Avoid processing MSG files from untrusted sources\n  - Implement additional filename validation before processing","format":"markdown","source":"ghsa"},{"lang":"es","text":"La librería 'unstructured' proporciona componentes de código abierto para la ingesta y el preprocesamiento de imágenes y documentos de texto, como PDF, HTML, documentos de Word y muchos más. Antes de la versión 0.18.18, una vulnerabilidad de salto de ruta en la función 'partition_msg' permite a un atacante escribir o sobrescribir archivos arbitrarios en el sistema de archivos al procesar archivos MSG maliciosos con archivos adjuntos. Este problema ha sido parcheado en la versión 0.18.18.","source":"nvd"}],"published":"2026-02-03T17:43:56.000Z","modified":"2026-09-10T03:50:34.982Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-22","CWE-73"],"affected":[{"ranges":[{"version":"< 0.18.18","status":"affected"}],"vendor":"Unstructured-IO","product":"unstructured","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.18.18"}],"ecosystem":"PyPI","package":"unstructured","purl":"pkg:pypi/unstructured","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.18.18"}],"vendor":"unstructured","product":"unstructured","cpe":"cpe:2.3:a:unstructured:unstructured:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.18.18"}],"ecosystem":"PyPI","package":"unstructured","purl":"pkg:pypi/unstructured","source":"pysec"}],"references":[{"url":"https://github.com/Unstructured-IO/unstructured/security/advisories/GHSA-gm8q-m8mv-jj5m","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Unstructured-IO/unstructured/commit/b01d35b2373fd087d2e15162b9c021663c97155d","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64712","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/Unstructured-IO/unstructured","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/unstructured","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-gm8q-m8mv-jj5m","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-02-04T19:24:03.397Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-64712","url":"https://www.cve.org/CVERecord?id=CVE-2025-64712","licence":"CVE Terms of Use","modified":"2026-02-04T19:24:12.411Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gm8q-m8mv-jj5m","url":"https://github.com/advisories/GHSA-gm8q-m8mv-jj5m","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:34.982Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-64712","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64712","licence":"Public domain","modified":"2026-06-17T09:55:05.323Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-558","url":"https://osv.dev/vulnerability/PYSEC-2026-558","licence":"CC-BY-4.0","modified":"2026-07-13T16:15:34.752Z"}],"updatedAt":"2026-11-25T22:59:11.049Z","epss":{"score":0.00687,"percentile":0.53942,"date":"2026-12-01T12:00:22.000Z"}}