# CVE-2026-129301: mail-parser: One hostile attachment aborts `write_attachments()` and silently drops the rest of the batch

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 32% of CVEs (2026-12-01)
- Published: 2026-11-16T17:47:32.676Z
- Modified: 2026-11-18T16:18:10.803Z
- Also known as: GHSA-8cgq-x343-p74c
- Weaknesses: CWE-248, CWE-436
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

mail-parser is a tool that parses emails by enhancing the Python standard library and extracting message details into a comprehensive object. From 4.6.0 until 4.6.3, write_attachments() calls _safe_attachment_filename() and write_sample() without isolating failures for individual attacker-controlled MIME parts. An RFC 2231 filename containing a NUL, a basename exceeding NAME_MAX, or an undecodable base64 payload can raise ValueError, OSError, or binascii.Error and abort the entire save loop. Later attachments remain unwritten; when a caller catches only MailParserError, the failure is not surfaced through the expected library-exception path. If a downstream scanner or sandbox reads only the extraction directory, a payload after the crafted part can be missed even though it remains in the delivered message, and the aborted batch also causes availability loss. This issue is fixed in version 4.6.3.

(As written by CVE List.)

## Affected

- SpamScope mail-parser: >= 4.6.0, < 4.6.3
- mail-parser (PyPI): from 4.6.0 before 4.6.3

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`

## References

- <https://github.com/SpamScope/mail-parser/security/advisories/GHSA-8cgq-x343-p74c> (web)
- <https://github.com/SpamScope/mail-parser/pull/171> (web)
- <https://github.com/SpamScope/mail-parser/commit/11b894a0b8b3f11055a99caff118206138d1daba> (web)
- <https://github.com/SpamScope/mail-parser/commit/e1d9fe6778045d6e2c44406bc8822e3464c1097f> (web)
- <https://github.com/SpamScope/mail-parser/releases/tag/4.6.3> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-129301> (advisory)
- <https://github.com/SpamScope/mail-parser> (package)

## Sources

- CVE List: [CVE-2026-129301](https://www.cve.org/CVERecord?id=CVE-2026-129301), CVE Terms of Use, modified 2026-11-18
- GitHub Advisory Database: [GHSA-8cgq-x343-p74c](https://github.com/advisories/GHSA-8cgq-x343-p74c), CC-BY-4.0, modified 2026-11-16
- NVD: [CVE-2026-129301](https://nvd.nist.gov/vuln/detail/CVE-2026-129301), Public domain, modified 2026-11-18

---

Page: https://cve.day/CVE-2026-129301 · Whole record: https://cve.day/CVE-2026-129301.json · Rebuilt by cve.day 2026-11-25T22:59:50.908Z
