Mittel

mail-parser: Path Traversal vulnerability in attachment extraction

  • Veröffentlicht: 16.11.2026
  • Aktualisiert: 17.11.2026 00:17

A path traversal vulnerability was identified in mail-parser when extracting email attachments using the write_attachments() and write_sample() APIs.

A specially crafted email containing malicious attachment filenames (for example, using directory traversal sequences such as "../" or absolute filesystem paths) could cause files to be written outside the intended output directory. Depending on how the library was used and the permissions of the executing process, this could result in arbitrary file overwrite.

The vulnerability affects mail-parser versions 3.8.0 through 4.5.0.

The issue has been addressed by introducing comprehensive filename sanitization and path validation before any file is written to disk. The fix includes:

  • Sanitization of attachment filenames before writing.
  • Validation that all output paths remain within the intended destination directory.
  • Rejection of symbolic link targets.
  • Normalization of Windows and POSIX path separators.
  • Validation and rejection of invalid or unsafe filenames.
  • Protection applied consistently in both write_attachments() and write_sample() APIs.

Users are strongly encouraged to upgrade to the patched release.

Credits

The vulnerability was responsibly reported by Niranjan Ganesan (Security Insights, https://securityinsights.io/, GitHub: @iam-niranjan).

The vulnerability was analyzed, remediated, and the security fix was implemented by Fedele Mantuano, maintainer of mail-parser (LinkedIn: https://www.linkedin.com/in/fmantuano/).

mail-parser would like to thank Niranjan Ganesan for following a coordinated vulnerability disclosure process and for collaborating throughout the remediation and verification of the fix.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) mail-parser >= 3.8.0, < 4.6.0 4.6.0

Verweise

CVSS-Wert 6.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Schwäche (CWE)
CWE-22, CWE-73
Plattform
Python (PyPI)
Paket
mail-parser
Veröffentlicht
16.11.2026
Aktualisiert
17.11.2026 00:17

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-fr3h-cpq2-9496 - CC BY 4.0

Schwachstellenhistorie: mail-parser

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
6
Erste → letzte
11.2026 11.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 2
  • Mittel 4

Veröffentlichungen pro Jahr

  1. 2026: 6
  1. Mittel · 5.3 CVE-2026-129300 >= 3.7.0, < 4.6.3 4.6.3
  2. Hoch · 7.5 CVE-2026-129295 >= 4.2.0, < 4.6.1 4.6.1
  3. mail-parser: Path Traversal vulnerability in attachment extraction dieser Eintrag
    Mittel · 6.5 CVE-2026-129296 >= 3.8.0, < 4.6.0 4.6.0

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.