CVE-2026-61815: zbateson/mail-mime-parser has CRLF header injection via attachment filename
A CRLF (carriage-return / line-feed) header injection 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.
References
- github.com/advisories/GHSA-36h5-qg4p-q2qf
- github.com/zbateson/mail-mime-parser/commit/81859c06abb5d79f04b7a3254d293d0a91065948
- github.com/zbateson/mail-mime-parser/commit/d2970b5df266f62e5ee8e675bfb05502b70fc6e1
- github.com/zbateson/mail-mime-parser/releases/tag/3.0.7
- github.com/zbateson/mail-mime-parser/releases/tag/4.0.2
- github.com/zbateson/mail-mime-parser/security/advisories/GHSA-36h5-qg4p-q2qf
- nvd.nist.gov/vuln/detail/CVE-2026-61815
Code Behaviors & Features
Detect and mitigate CVE-2026-61815 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →