CVE-2026-129296
Received Received - Intake

Directory Traversal in mail-parser via Attachment Handling

Vulnerability report for CVE-2026-129296, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-16

Last updated on: 2026-11-16

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-16
Last Modified
2026-11-16
Generated
2026-11-16
AI Q&A
2026-11-16
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a path traversal issue in the mail-parser library affecting versions 3.8.0 to 4.5.0. Attackers can craft email attachments with malicious filenames containing directory traversal sequences like '../' or absolute paths. When the library processes these attachments using write_attachments() or write_sample(), it may write files outside the intended output directory, potentially overwriting existing files accessible to the parsing process.

Detection Guidance

Check if your system uses mail-parser versions between 3.8.0 and 4.5.0. Run: pip show mail-parser to verify the installed version. If vulnerable, inspect email attachments for filenames containing path traversal sequences like '../' or absolute paths. Use grep to search for suspicious filenames in logs or extracted attachments.

Impact Analysis

If you use the affected mail-parser versions, an attacker could overwrite critical files on your system by sending a specially crafted email. This could disrupt services, corrupt data, or execute unauthorized actions if the overwritten files are executable or configuration files. The impact depends on the permissions of the process running the parser.

Mitigation Strategies

Upgrade mail-parser to version 4.6.0 or later immediately. If upgrading is not possible, implement input validation to sanitize attachment filenames before processing. Ensure the application does not use the raw 'filename' field directly for path construction.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-129296. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...