{"id":"CVE-2026-129296","published":"2026-11-16T17:36:06Z","modified":"2026-11-18T15:16:36Z","title":"mail-parser: Path Traversal vulnerability in attachment extraction","vendor":"SpamScope","product":"mail-parser","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.006,"percentile":0.49651,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/SpamScope/mail-parser/security/advisories/GHSA-fr3h-cpq2-9496","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/SpamScope/mail-parser/pull/165","tags":["x_refsource_MISC"]},{"url":"https://github.com/SpamScope/mail-parser/commit/3d6cb7a51f2ad7ea57e529121dbd5d56f29fefe8","tags":["x_refsource_MISC"]},{"url":"https://github.com/SpamScope/mail-parser/commit/b0a2e968815f3ed9e129efb0f5f7e935a9dacd1d","tags":["x_refsource_MISC"]},{"url":"https://github.com/SpamScope/mail-parser/releases/tag/4.6.0","tags":["x_refsource_MISC"]}],"priority":{"score":14.5,"factors":[{"name":"EPSS percentile","points":9.93},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"spamscope","affectedVersions":[{"vendor":"SpamScope","product":"mail-parser","versions":[">= 3.8.0, < 4.6.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-11-18T15:13:54.826971Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"mail-parser","vulnerableRanges":[">=3.8.0, <4.6.0"],"patched":["4.6.0"],"from":["GHSA-fr3h-cpq2-9496"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-126571","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-spamscope-mail-parser-cve-2026-129295","children":[{"from":"CVE-2026-129296","to":"CVE-2026-129297","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/mailparser/core.py","src/mailparser/utils.py"],"commits":["https://github.com/SpamScope/mail-parser/commit/3d6cb7a51f2ad7ea57e529121dbd5d56f29fefe8","https://github.com/SpamScope/mail-parser/commit/b0a2e968815f3ed9e129efb0f5f7e935a9dacd1d","https://github.com/SpamScope/mail-parser/commit/ce3cf3559db1ff806bda598b378de9f8c2a5be96"],"basis":"shared function","functions":["parse"]}]},{"from":"CVE-2026-129296","to":"CVE-2026-129299","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/mailparser/core.py","src/mailparser/utils.py"],"commits":["https://github.com/SpamScope/mail-parser/commit/3d6cb7a51f2ad7ea57e529121dbd5d56f29fefe8","https://github.com/SpamScope/mail-parser/commit/b0a2e968815f3ed9e129efb0f5f7e935a9dacd1d","https://github.com/SpamScope/mail-parser/commit/ce3cf3559db1ff806bda598b378de9f8c2a5be96"],"basis":"shared function","functions":["parse"]}]},{"from":"CVE-2026-129296","to":"CVE-2026-129300","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/mailparser/core.py","src/mailparser/utils.py"],"commits":["https://github.com/SpamScope/mail-parser/commit/3d6cb7a51f2ad7ea57e529121dbd5d56f29fefe8","https://github.com/SpamScope/mail-parser/commit/b0a2e968815f3ed9e129efb0f5f7e935a9dacd1d","https://github.com/SpamScope/mail-parser/commit/d69f6f9b6ad0bf74d731b373bbdeabb462c32b26","https://github.com/SpamScope/mail-parser/commit/e1d9fe6778045d6e2c44406bc8822e3464c1097f"],"basis":"shared function","functions":["parse","print_attachments","write_sample"]}]},{"from":"CVE-2026-129296","to":"CVE-2026-129301","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/mailparser/core.py","src/mailparser/utils.py"],"commits":["https://github.com/SpamScope/mail-parser/commit/3d6cb7a51f2ad7ea57e529121dbd5d56f29fefe8","https://github.com/SpamScope/mail-parser/commit/b0a2e968815f3ed9e129efb0f5f7e935a9dacd1d","https://github.com/SpamScope/mail-parser/commit/e1d9fe6778045d6e2c44406bc8822e3464c1097f","https://github.com/SpamScope/mail-parser/commit/11b894a0b8b3f11055a99caff118206138d1daba"],"basis":"shared function","functions":["parse","print_attachments","write_sample"]}]}],"packageHistory":[{"cve":"CVE-2026-129296","published":"2026-11-16","fixed":"4.6.0","kev":false},{"cve":"CVE-2026-129295","published":"2026-11-16","fixed":"4.6.1","kev":false,"link":{"from":"CVE-2026-129296","to":"CVE-2026-129295","relation":"successor","confidence":"high","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:mail-parser","fromFixed":"4.6.0","toFixed":"4.6.1","daysApart":0},{"kind":"same-code","provenance":"machine","files":["src/mailparser/core.py","src/mailparser/utils.py"],"commits":["https://github.com/SpamScope/mail-parser/commit/037293158cb291caa96635a54449243d32cd4d96","https://github.com/SpamScope/mail-parser/commit/5aab122f0d763991604d2c2bcc807c6bf2489464","https://github.com/SpamScope/mail-parser/commit/3d6cb7a51f2ad7ea57e529121dbd5d56f29fefe8","https://github.com/SpamScope/mail-parser/commit/b0a2e968815f3ed9e129efb0f5f7e935a9dacd1d"],"basis":"shared file"}]}},{"cve":"CVE-2026-129297","published":"2026-11-16","fixed":"4.6.2","kev":false},{"cve":"CVE-2026-129299","published":"2026-11-16","fixed":"4.6.2","kev":false}],"package":"PyPI:mail-parser"}}