CVE-2026-129296: mail-parser: Path Traversal vulnerability in attachment extraction

Published Nov 16, 2026
·
Updated

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 writeattachments() and writesample() 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.

Affected Software

1 affected component
pypi/mail-parser>=3.8.0<4.6.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 4.6.0

Event History

Nov 16, 2026
CVE Published
via MITRE·05:36 PM
Data Sourced
via MITRE·05:36 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using mail-parser versions from 3.8.0 up to, but not including, 4.6.0 are exposed when they call write_attachments() or write_sample() on attacker-crafted email content. The impact is limited to files that the parsing process has permission to overwrite.

2

What does an attacker need to exploit it?

An attacker needs to provide a crafted email with an attachment filename containing directory-traversal sequences or an absolute filesystem path, and have that message processed by an application that extracts attachments using the affected APIs. No authentication is required, but user interaction is required according to the supplied severity vector.

3

Is there a fixed version available?

Yes. The issue is fixed in mail-parser version 4.6.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203