Skip to content
High 7.2

Vulnerability in zbateson/mail-mime-parser

CVE-2026-61815 First seen on SecPulse

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

A vulnerability tracked as CVE-2026-61815 has been found in zbateson/mail-mime-parser.
Attackers can target a specific entry point like filename over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 7.2/10.
What to do: upgrade zbateson/mail-mime-parser to 4.0.2 or later.
If unsure, ask your IT team or search "zbateson/mail-mime-parser CVE-2026-61815" on the vendor's site.

CVE-2026-61815 (zbateson/mail-mime-parser) — CWE-93 / CVSS v3 7.2
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: filename / doc / MimeToken
Patched: 4.0.2 — apply immediately
Workaround: 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.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

What is the problem

A vulnerability (CWE-93) exists in zbateson/mail-mime-parser. Attackers reach the vulnerable code path via filename without authentication.

Affected scope

Check the vendor advisory for the affected versions of zbateson/mail-mime-parser. Attack surface: filename / doc / MimeToken.

Severity

Severity: High (CVSS 7.2/10). Risk of unauthorized operations or information disclosure.

How to fix

Update to 4.0.2.

Workaround

Workaround: 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.

Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'zbateson/mail-mime-parser' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposureidentify
    grep -r 'zbateson/mail-mime-parser' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で zbateson/mail-mime-parser を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaroundmitigate
    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.

    パッチが適用されるまでの応急処置として、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. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patchpatch
    Upgrade zbateson/mail-mime-parser to 4.0.2

    ステージング環境で 4.0.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
composerzbateson/mail-mime-parser
< 4.0.2→ 4.0.2
Original description The description as published by the source.

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).

Source: NIST National Vulnerability Database NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details