See how fetchmail compares to other vendors in security performance
Fetchmail (aka fetchmail-ssl) before 5.8.17 allows a remote malicious (1) IMAP server or (2) POP/POP3 server to overwrite arbitrary memory and possibly gain privileges via a negative index number as part of a response to a LIST request.
Vulnerability in fetchmail 5.5.0-2 and earlier in the AUTHENTICATE GSSAPI command.
fetchmail before 6.3.1 and before 6.2.5.5, when configured for multidrop mode, allows remote attackers to cause a denial of service (application crash) by sending messages without headers from upstream mail servers.
fetchmail before 6.3.6-rc4 does not properly enforce TLS and may transmit cleartext passwords over unsecured links if certain circumstances occur, which allows remote attackers to obtain sensitive information via man-in-the-middle (MITM) attacks.
fetchmail 6.3.5 and 6.3.6 before 6.3.6-rc4, when refusing a message delivered via the mda option, allows remote attackers to cause a denial of service (crash) via unknown vectors that trigger a NULL pointer dereference when calling the (1) ferror or (2) fflush functions.
A buffer overflow in Linux fetchmail before 5.8.6 allows remote attackers to execute arbitrary code via a large 'To:' field in an email header.
Heap-based buffer overflow in Fetchmail 6.1.3 and earlier does not account for the "@" character when determining buffer lengths for local addresses, which allows remote attackers to execute arbitrary code via a header with a large number of local addresses.
Buffer overflows in Fetchmail 6.0.0 and earlier allow remote attackers to cause a denial of service (crash) or execute arbitrary code via (1) long headers that are not properly processed by the readheaders function, or (2) via long Received: headers, which are not properly parsed by the parsereceived function.
reportvbuild in report.c in Fetchmail before 6.4.20 sometimes omits initialization of the vsnprintf valist argument, which might allow mail servers to cause a denial of service or possibly have unspecified other impact via long error messages. NOTE: it is unclear whether use of Fetchmail on any realistic platform results in an impact beyond an inconvenience to the client user.
The sdump function in sdump.c in fetchmail 6.3.11, 6.3.12, and 6.3.13, when running in verbose mode on platforms for which char is signed, allows remote attackers to cause a denial of service (application crash) or possibly execute arbitrary code via an SSL X.509 certificate containing non-printable characters with the high bit set, which triggers a heap-based buffer overflow during escaping.
socket.c in fetchmail before 6.3.11 does not properly handle a '\0' character in a domain name in the subject's Common Name (CN) field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority, a related issue to CVE-2009-2408.
In fetchmail before 6.5.6, the SMTP client can crash when authenticating upon receiving a 334 status code in a malformed context.
Fetchmail before 6.4.22 fails to enforce STARTTLS session encryption in some circumstances, such as a certain situation with IMAP and PREAUTH.
Fetchmail 5.0.8 through 6.3.21, when using NTLM authentication in debug mode, allows remote NTLM servers to (1) cause a denial of service (crash and delayed delivery of inbound mail) via a crafted NTLM response that triggers an out-of-bounds read in the base64 decoder, or (2) obtain sensitive information from memory via an NTLM Type 2 message with a crafted Target Name structure, which triggers an out-of-bounds read.
Buffer overflow in the POP3 client in Fetchmail before 6.2.5.2 allows remote POP3 servers to cause a denial of service and possibly execute arbitrary code via long UIDL responses. NOTE: a typo in an advisory accidentally used the wrong CVE identifier for the Fetchmail issue. This is the correct identifier.
Fetchmail 6.2.4 and earlier does not properly allocate memory for long lines, which allows remote attackers to cause a denial of service (crash) via a certain email.
fetchmail email client before 5.9.10 does not properly limit the maximum number of messages available, which allows a remote IMAP server to overwrite memory via a message count that exceeds the boundaries of an array.
fetchmail 6.3.0 and other versions before 6.3.2 allows remote attackers to cause a denial of service (crash) via crafted e-mail messages that cause a free of an invalid pointer when fetchmail bounces the message to the originator or local postmaster.
The getmxrecord function in Fetchmail 6.0.0 and earlier does not properly check the boundary of a particular malformed DNS packet from a malicious DNS server, which allows remote attackers to cause a denial of service (crash) when Fetchmail attempts to read data beyond the expected boundary.
fetchmail 5.9.9 through 6.3.19 does not properly limit the wait time after issuing a (1) STARTTLS or (2) STLS request, which allows remote servers to cause a denial of service (application hang) by acknowledging the request but not sending additional packets.
sink.c in fetchmail before 6.3.9 allows context-dependent attackers to cause a denial of service (NULL dereference and application crash) by refusing certain warning messages that are sent over SMTP.
fetchmail 4.6.3 through 6.3.16, when debug mode is enabled, does not properly handle invalid characters in a multi-character locale, which allows remote attackers to cause a denial of service (memory consumption and application crash) via a crafted (1) message header or (2) POP3 UIDL list.
fetchmail 6.3.8 and earlier, when running in -v -v (aka verbose) mode, allows remote attackers to cause a denial of service (crash and persistent mail failure) via a malformed mail message with long headers, which triggers an erroneous dereference when using vsnprintf to format log messages.
fetchmailconf in fetchmail before 5.7.4 allows local users to overwrite files of other users via a symlink attack on temporary files.
fetchmailconf before 1.49 in fetchmail 6.2.0, 6.2.5 and 6.2.5.2 creates configuration files with insecure world-readable permissions, which allows local users to obtain sensitive information such as passwords.
https://www.fetchmail.info/fetchmail-SA-2025-01.txt reports:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
fetchmail-SA-2025-01: SMTP AUTH denial of service
Topics: fetchmail SMTP client can crash when authenticating
Author: Matthias Andree Version: 1.0 Announced: 2025-10-03 Type: failure to validate network input in certain configurations Impact: fetchmail tries to read from address 1 and can crash Severity: moderate
URL: https://www.fetchmail.info/fetchmail-SA-2025-01.txt Project URL: https://www.fetchmail.info/ CVE Name: pending, requested via MITRE as CNA-LR
Affects: - fetchmail releases up to and including 6.5.5 - fetchmail 7.0.0 pre-releases
Not affected: - fetchmail 6.5 releases 6.5.6 and newer
Introduced in: 2002-03-09 fetchmail release 5.9.9 added SMTP AUTH
Corrected in: 2025-10-03 Git commit 4c3cebfa4e659fb778ca2cae0ccb3f69201609a8 2025-10-03 fetchmail release 6.5.6
1. Background =============
fetchmail is a software package to retrieve mail from remote POP3, IMAP, ETRN or ODMR servers and forward it to local SMTP, LMTP servers or message delivery agents.
fetchmail defaults to using the SMTP server on "localhost" and to not attempting to authenticate, unless configured otherwise.
fetchmail also supports a "daemon" mode, where it runs over extended time and periodically polls the upstream servers. This can detach fetchmail from the controlling terminal into the background, or - with a "nodetach" setting - - keep attached to the controlling terminal, which also eases use by service supervisors.
2. Problem description and Impact =================================
fetchmail's SMTP client, when configured to authenticate [1], is susceptible to a protocol violation where, when a trusted but malicious or malfunctioning SMTP server responds to an authentication request with a "334" code but without a following blank on the line, it will attempt to start reading from memory address 0x1 to parse the server's SASL challenge. This address is constant and not under the attacker's control. This event will usually cause a crash of fetchmail. If fetchmail in this situation was running in daemon mode, this mode is also terminated by the crash.
[1] This requires the esmtpname and esmtppassword options to be configured in the configuration file and the plugout and mda options to be inactive.
As a word of warning, this vulnerability has eluded several static code analyzers.
3. Solutions ============
General recommendation: if running fetchmail in the background or in daemon mode, ensure that the daemon is supervised and crashes are reported so that action can be taken about the malfunctioning SMTP server, or on fetchmail's end to replace local delivery by different server or other means.
3a. Install fetchmail 6.5.6 or newer.
The fetchmail source code is available from <https://sourceforge.net/projects/fetchmail/files/> and <https://gitlab.com/fetchmail/fetchmail/-/releases>
The Git-based source code repository is currently published via https://gitlab.com/fetchmail/fetchmail/-/tree/legacy6x (primary) https://sourceforge.net/p/fetchmail/git/ci/legacy6x/tree/ (copy)
3b. Apply the smtp.c patch from the URL below and rebuild fetchmail: <https://gitlab.com/fetchmail/fetchmail/-/commit/4c3cebfa4e659fb778ca2cae0ccb3f69201609a8>
A. Copyright, License and Non-Warranty ======================================
(C) Copyright 2025 by Matthias Andree, <matthias.andree () gmx de>. Some rights reserved.
This file is licensed under CC BY-ND 4.0. To view a copy of this license, visit <http://creativecommons.org/licenses/by-nd/4.0/>
THIS WORK IS PROVIDED FREE OF CHARGE AND WITHOUT ANY WARRANTIES. Use the information herein at your own risk.
END of fetchmail-SA-2025-01 -----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE3EplW9mTzUhx+oIQ5BKxVu/zhVoFAmjfuj8ACgkQ5BKxVu/z hVoXfRAApBdTub7EDpczbGlHfuqM96xFFRXHahETtL3sPSTNf+EB5CpBH+t5wV2M zeYcdbYLgf0X/nT8+ua2lyP8c5YW5OOntINa49HOwYhTnIf/Msju4NS9RExigOxM xpUAFNO8Mci79q7NWxrNJkOZIy5OfM1cTxXfECbibWjg2MsbZj7BaJu3EdkEmpOp bzKBbL87Fv3dfYYvrRgBeJo7jvl9PqqNgY+WtBSC4lkHKstA0QaEYvkZDzQW4pwC ZUQASWpDHEQTU5VSaKNXEMy3g9nqmLtMBx66VH8Gzv/dh73x5rouiExKQIjKBMxD LUkibZ2iQOQR2gETd/QwtY98W5KGCW5pjVdIV2SJsoPOte0OEaMI5aersREmI52O R++3dmOeKbT/DW6SGCvY8xGKXqCfQfQy66XY3/ZXBpE7xJITGEzjiYqOv7Tt5L8E 3VKCRC/MVbkrPF8Hnh9It75OdxO6v1gG/GNBOStiHVU6cOhPQmwykhTug4UjfOzZ 0n6c5DNk7Lz3m1AjWHIGgO7v0rHWibH5rw3ksBQi0X3OSv4xqrSTHsQz0WV+l3KS q98e0GtG5g/aKQL1EWp+/VNXjrhm3I+Wg+haR3zJ/PcTdxEfpaXW4RUTsK2MAxvm 1HPZuyhLFpgsptFGvPbJONUnah/OWttaPCfrM5neP9wZzPHLnjs= =Su9H -----END PGP SIGNATURE-----
Am 03.10.25 um 20:55 schrieb Alan Coopersmith: https://www.fetchmail.info/fetchmail-SA-2025-01.txt reports: fetchmail-SA-2025-01: SMTP AUTH denial of service
Topics: fetchmail SMTP client can crash when authenticating
Author: Matthias Andree Version: 1.0 Announced: 2025-10-03 Type: failure to validate network input in certain configurations Impact: fetchmail tries to read from address 1 and can crash Severity: moderate
URL: https://www.fetchmail.info/fetchmail-SA-2025-01.txt [...]
REJECT DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: the reported issue is not a vulnerability or exposure. Notes: This candidate was assigned to a "head-reading" bug in a component of fetchmail 6.2.4 and earlier, which was claimed to allow a denial of service. However, the bug is in a broken component of fetchmail that is not "reachable" by any execution path, so it cannot be triggered by any sort of attack and is not exploitable.