Skip to main content

mail-parser CVE-2026-129296

| EUVDEUVD-2026-126571 MEDIUM
Path Traversal (CWE-22)
2026-11-16 GitHub_M GHSA-fr3h-cpq2-9496
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft email with traversal filename
  2. Delivery
    Deliver message to parsing application
  3. Exploit
    App extracts via write_attachments()/write_sample()
  4. Execution
    Filename joined without containment check
  5. Persist
    File written outside output directory
  6. Impact
    Overwrite files accessible to process

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the deploying application (1) runs mail-parser 3.8.0 through 4.5.0 and (2) invokes write_attachments() or write_sample() to save attachments from attacker-supplied email to disk - this is the UI:R / interaction prerequisite. The attacker-controlled input is the attachment filename in Content-Disposition (including RFC 2231 'filename*=' encoded forms such as utf-8''..%2Fmarker.txt) or a Content-ID used as a name; no authentication is needed to send the email (PR:N). Impact is limited by the filesystem permissions of the parsing process (only files writable by that process can be overwritten) and by whether the application actually extracts attachments to disk - applications that only read parsed attachment bytes without calling the write APIs are not exposed.

Impact

This is a moderate, context-dependent risk rather than an emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N, base 6.5) reflects an unauthenticated, network-delivered path-traversal that requires the consuming application to actually call the vulnerable extraction APIs (UI:R), with high integrity impact (arbitrary file overwrite) but no confidentiality or availability impact. The vuln.today decision label is 'this_month' - a prioritize-but-not-immediate signal - which is consistent with the absence of a CISA KEV listing and no supplied EPSS score. No exploitation-probability (EPSS) value was provided in the input, so widespread-versus-targeted likelihood cannot be quantified. The references are vendor fix artifacts (GHSA advisory, PR #165, two commits, and the 4.6.0 release) rather than exploit code, so there is no confirmed public weaponized exploit. The key caveat: real risk is almost entirely gated by whether a deployed application passes attacker-controlled attachments to write_attachments()/write_sample() against a writable directory - the library itself is only dangerous when used that way, so raw CVSS overstates risk for deployments that do not save attachments to disk.

Exploit ScenarioDerived

An attacker sends a crafted email whose attachment filename contains directory-traversal sequences (e.g. '../') or an absolute path. When a downstream application running mail-parser 3.8.0-4.5.0 extracts attachments via write_attachments() or write_sample(), the file is written outside the intended output directory, overwriting any file the parsing process can write. No public weaponized exploit is identified, though the fix's regression test demonstrates the crafted-filename trigger.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 16, 2026

mail-parser versions 3.8.0 through 4.5.0 write email attachments to disk using the sender-supplied filename from Content-Disposition (including RFC 2231 'filename*=' encoded forms) or Content-ID without stripping directory components or verifying that the resulting path stays inside the output directory, so a crafted message can overwrite files outside it. The flaw is reachable only when the consuming application calls write_attachments() or write_sample() on attacker-supplied email - that extraction step is the user-interaction prerequisite - and the attacker can only overwrite files the parsing process itself can write. No public exploit code identified at time of analysis; the vendor shipped a fix in 4.6.0 that sanitizes filenames, enforces path containment, rejects symlink destinations and deduplicates names, making this a moderate, context-dependent risk rather than an emergency.

RemediationAI

Upgrade mail-parser to version 4.6.0 or later (pip install --upgrade mail-parser), which applies filename sanitization, path containment validation, symlink rejection, separator normalization and per-batch deduplication in both write_attachments() and write_sample(); the fix is visible in pull request https://github.com/SpamScope/mail-parser/pull/165 with commits 3d6cb7a51f2ad7ea57e529121dbd5d56f29fefe8 and b0a2e968815f3ed9e129efb0f5f7e935a9dacd1d. If upgrading is not immediately possible, stop passing the untrusted 'filename' value into filesystem paths: reduce it to a basename yourself, reject names that are empty, '.' or '..' or that contain NUL bytes or either path separator, and confirm with os.path.commonpath that the resolved destination still sits under the intended directory before opening it. Direct the write APIs at a dedicated extraction directory owned by a low-privilege account so that a traversal can only reach files that account can already modify, and avoid following pre-existing symlinks there. Calls that only need attachment content should consume the in-memory bytes instead of invoking the write APIs at all, which removes the vulnerable path entirely. Note that these application-side measures duplicate the 4.6.0 logic and can drift from it; the upgrade remains the complete fix.

Affected VersionsENISA

mail-parser 3.8.0, < 4.6.0

Affected Packages

pypi mail-parser fix: 4.6.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

mail-parser is a Python library that wraps the standard email package and exposes parsed messages, including an attachments list, as objects. The root cause class is CWE-22 (improper limitation of a pathname to a restricted directory), compounded by CWE-73 (external control of file name or path): the 'filename' value decoded from MIME headers is untrusted metadata that was previously joined directly to the caller's output directory in write_attachments() and in write_sample(binary, payload, path, filename). Absolute paths and '../' sequences therefore resolved outside that directory, and pre-existing symlinks at the destination were not checked. The 4.6.0 fix adds a _safe_attachment_filename() helper that rejects non-string and NUL-containing names, normalizes both POSIX '/' and Windows '\\' separators before taking os.path.basename(), and rejects '', '.' and '..'; write_sample() now creates the directory with exist_ok=True, resolves both the base directory and the candidate path with os.path.realpath(), and requires os.path.commonpath() to equal the base while rejecting os.path.islink() targets. The same change exposes a new 'safe_filename' field on attachment entries and adds batch deduplication with compound-extension awareness (.tar.gz, .tar.xz, .tar.zst, etc.). Because the write paths are library APIs rather than network endpoints, exposure depends entirely on how the integrating application uses them.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
vuln.today AI 6.5 MEDIUM

Email is network-delivered (AV:N) with no auth to send (PR:N), but exploitation depends on the application invoking the write APIs (UI:R); impact is arbitrary file overwrite (I:H) with no disclosure or guaranteed outage (C:N/A:N).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

1
Patch available
Nov 16, 2026 - 19:02 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.6%
Top 51% exploitable
Prevalence
Low
niche Python email-parsing library used in specialized forensics/security pipelines
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

53
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy