# CVE-2026-61815: zbateson/mail-mime-parser has CRLF header injection via attachment filename

- Severity: High 7.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`
- 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.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2026-09-24T17:53:32.355Z
- Modified: 2026-10-05T16:17:14.673Z
- Also known as: GHSA-36h5-qg4p-q2qf
- Weaknesses: CWE-93
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

zbateson/mail-mime-parser is a mail mime parser alternative to PHP's imap* functions and Pear libraries for reading messages in Internet Message Format RFC 822. Prior to version 3.0.6 and 4.0.2, CRLF (carriage-return / line-feed) header injection (CWE-93) affecting any application that uses this library to build or forward MIME messages with an attacker-influenced attachment filename. Attachment filenames are interpolated into the `Content-Type` and `Content-Disposition` header values without stripping CR/LF, so a filename containing `\r\n` serializes as one or more additional, attacker-controlled header lines (for example a forged `Bcc:` that silently exfiltrates a copy of the outgoing message). The untrusted filename can come directly from parsed inbound mail, so no local construction is required — an application that re-attaches or re-sends a parsed filename is exposed. Versions 3.0.6 and 4.0.2 patch the issue. Versions 1.x and 2.x are also affected but are end-of-life and will not receive patches; users on those lines should upgrade to a fixed release. If upgrading is not immediately possible, strip CR and LF from any filename before passing it to attachment APIs, and from the result of getFilename() before reusing it in a constructed message — e.g. preg_replace('/[\r\n]+/', ' ', $filename).

(As written by CVE List.)

## Affected

- zbateson mail-mime-parser: < 3.0.6; >= 4.0.0, < 4.0.2
- zbateson/mail-mime-parser (Packagist): before 3.0.6; from 4.0.0 before 4.0.2

## Every score

- GitHub_M: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`

## References

- <https://github.com/zbateson/mail-mime-parser/security/advisories/GHSA-36h5-qg4p-q2qf> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-61815> (advisory)
- <https://github.com/zbateson/mail-mime-parser/commit/81859c06abb5d79f04b7a3254d293d0a91065948> (web)
- <https://github.com/zbateson/mail-mime-parser/commit/d2970b5df266f62e5ee8e675bfb05502b70fc6e1> (web)
- <https://github.com/zbateson/mail-mime-parser> (package)
- <https://github.com/zbateson/mail-mime-parser/releases/tag/3.0.7> (web)
- <https://github.com/zbateson/mail-mime-parser/releases/tag/4.0.2> (web)

## Sources

- CVE List: [CVE-2026-61815](https://www.cve.org/CVERecord?id=CVE-2026-61815), CVE Terms of Use, modified 2026-10-05
- GitHub Advisory Database: [GHSA-36h5-qg4p-q2qf](https://github.com/advisories/GHSA-36h5-qg4p-q2qf), CC-BY-4.0, modified 2026-09-24
- NVD: [CVE-2026-61815](https://nvd.nist.gov/vuln/detail/CVE-2026-61815), Public domain, modified 2026-10-05

---

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