mail-parser: Path Traversal vulnerability in attachment extraction

State
Published
Severity
6.5 Medium
Published
Nov 16, 2026
Updated
Nov 18, 2026
Reserved
Nov 13, 2026

Read the record on cve.org

Description

mail-parser is a tool that parses emails by enhancing the Python standard library and extracting message details into a comprehensive object. From 3.8.0 until 4.6.0, the write_attachments() and write_sample() APIs use attacker-controlled attachment filenames without sufficient sanitization and path containment validation. Directory traversal sequences and absolute filesystem paths can cause an attachment to be written outside the intended output directory. An attacker can overwrite files accessible to the parsing process when an application extracts attachments from a crafted message. This issue is fixed in version 4.6.0.

ProductVersions
mail-parser SpamScope>= 3.8.0, < 4.6.0 Affected

Weaknesses

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.