21Nails vulnerabilities impact 60% of the internet's email servers
Vulnerabilities mentionedAll →
| CVE | Vulnerability | CVSS | EPSS | Flags | Affected | Exposure | Published |
|---|---|---|---|---|---|---|---|
| CVE-2018-6789 | Pre-auth Buffer Overflow RCE in Exim SMTP Listener CVE-2018-6789 is an off-by-one buffer overflow (CWE-120) in the base64d decoding function of Exim's SMTP listener, affecting Exim versions before 4.90.1. A remote, unauthenticated attacker triggers it by sending a handcrafted message to the SMTP listener, causing the overflow during base64 decoding. Successful exploitation yields arbitrary code execution on the mail server with the privileges of the Exim daemon. Affected operators include anyone running a vulnerable Exim mail transfer agent, including Exim as shipped in Debian and Ubuntu; Exim powers roughly half of internet-facing mail servers, with on the order of 400,000 servers exposed at disclosure. Exploitation is confirmed in the wild: the flaw is in CISA's Known Exploited Vulnerabilities catalog with known ransomware use, multiple public PoCs/exploits are available, and it appears in the NSA's list of top flaws abused by Chinese state-sponsored hackers. Do: Upgrade Exim to 4.90.1 or later, or apply the patched Exim package from Debian's and Ubuntu's security repositories on affected distributions. Inventory internet-facing SMTP services (ports 25/465/587) for vulnerable Exim versions, review mail logs for signs of exploitation, and prioritize patching given the flaw's CISA KEV listing and known ransomware use. | 9.8 | 82% | KEV ransomware PoC ×4 |
| mass≈400,000+ internet-exposed Exim mail servers; Exim runs on roughly half of internet-facing mail servers | |
| CVE-2019-10149 | Unvalidated Email Recipient Enables Remote Command Execution in Exim MTA CVE-2019-10149 is an improper input validation flaw (CWE-78, OS command injection) in the deliver_message() function in /src/deliver.c of the Exim mail transfer agent, where email recipient addresses are not safely validated before use. A remote attacker triggers it by sending mail whose recipient address contains crafted Exim string-expansion syntax (such as ${run{...}}), causing Exim to expand and execute attacker-supplied operating-system commands during recipient verification or delivery. An attacker gains arbitrary remote command execution on the mail server, commonly with elevated privileges, enabling full system compromise, data theft, ransomware deployment (e.g., the Trinity ransomware campaign), or installation of botnet implants. Any organization running an internet-exposed Exim MTA in the affected version range is at risk, and Exim is widely deployed as the default mail server on many Linux distributions. Exploitation is confirmed in the wild: mass scanning and compromise campaigns began shortly after the June 2019 disclosure, CISA added the flaw to its Known Exploited Vulnerabilities catalog on 2022-01-10, and its EPSS score of 100% (100th percentile) reflects near-certain near-term exploitation risk. Do: Upgrade Exim to 4.92 or later, or install your distribution's patched Exim package, as required by CISA's KEV action ('apply updates per vendor instructions'); if patching must be delayed, restrict internet-facing SMTP access and tighten recipient-verification configuration. Check mail logs for suspicious MAIL FROM/RCPT TO addresses containing expansion syntax such as ${run{...}} or shell-like commands, and audit patched servers for post-compromise artifacts such as unusual cron jobs, downloaded binaries, or new authorized SSH keys. | 9.8 | 100% | KEV PoC ×5 |
| mass≈500,000+ internet-exposed Exim SMTP servers, with hundreds of thousands likely running vulnerable versions | |
| CVE-2019-15846 | Exim before 4.92.2 allows remote attackers to execute arbitrary code as root via a trailing backslash. Exim before 4.92.2 allows remote attackers to execute arbitrary code as root via a trailing backslash. NVD description · AI analysis pending | 9.8 | 36% |
| — | ||
| CVE-2020-28018 | Exim 4 before 4.94.2 allows Use After Free in smtp_reset in certain situations that may be common for builds with OpenSSL. Exim 4 before 4.94.2 allows Use After Free in smtp_reset in certain situations that may be common for builds with OpenSSL. NVD description · AI analysis pending | 9.8 group max | 57% |
| — |
Full article651 words · extracted from therecord.media · click to collapse
The maintainers of the Exim email server software have released updates today to patch a collection of 21 vulnerabilities that can allow threat actors to take over servers using both local and remote attack vectors. Known as 21Nails, the vulnerabilities were discovered by security firm Qualys. The bugs impact Exim, a type of email server known as a mail transfer agent (MTA) that helps email traffic travel across the internet and reach its intended destinations. While there are different MTA clients available, an April 2021 survey shows that Exim has a market share of nearly 60% among all MTA solutions, being widely adopted around the internet. The 21Nails vulnerabilities, if left unpatched, could allow threat actors to take over these systems and then intercept or tamper with email communications passing through the Exim server. As Qualys explains in its security advisory, the 21Nails vulnerabilities are as bad as it gets. All Exim server versions released in the past 17 years, since 2004, the beginning of the project's Git history, are affected by the 21Nails bugs. This includes 11 vulnerabilities that require local access to the server to exploit, but also 10 bugs that can be exploited remotely across the internet. Security experts recommend that Exim server owners update to Exim version 4.94 to protect their systems against attacks. The utmost urgency in applying this patch is recommended. Previous Exim bugs disclosed during 2019 and 2020 have been broadly abused by both cybercrime botnets and nation-state threat actors. The most widely abused Exim bug was CVE-2019-10149, a bug known as "Return of the WIZard," which was also abused by Russia's infamous Sandworm group, according to a warning issued by the US National Security Agency last year. Other Exim bugs that were disclosed and abused in past attacks include CVE-2019-15846 and CVE-2018-6789. Qualys said it would not be publishing exploits for all the 21Nails Exim bugs; however, it also said that its "advisory contains sufficient information to develop reliable exploits" if an attacker would be interested. At the time of writing, there are more than 3.8 million Exim servers available online, according to a Shodan search. A serious patching effort is now needed from server owners and cloud providers to mitigate these issues before they come under attack, which is expected to happen if we take Exim's recent history into account. Furthermore, attacks are even more likely to occur if we consider that email servers are a rich target for all espionage-focused threat actors and that Microsoft Exchange email servers were also targeted for this same purpose earlier this year.All Exim versions released since 2004 are impacted
CVE Description Type CVE-2020-28007 Link attack in Exim’s log directory Local CVE-2020-28008 Assorted attacks in Exim’s spool directory Local CVE-2020-28014 Arbitrary file creation and clobbering Local CVE-2021-27216 Arbitrary file deletion Local CVE-2020-28011 Heap buffer overflow in queue_run() Local CVE-2020-28010 Heap out-of-bounds write in main() Local CVE-2020-28013 Heap buffer overflow in parse_fix_phrase() Local CVE-2020-28016 Heap out-of-bounds write in parse_fix_phrase() Local CVE-2020-28015 New-line injection into spool header file (local) Local CVE-2020-28012 Missing close-on-exec flag for privileged pipe Local CVE-2020-28009 Integer overflow in get_stdinput() Local CVE-2020-28017 Integer overflow in receive_add_recipient() Remote CVE-2020-28020 Integer overflow in receive_msg() Remote CVE-2020-28023 Out-of-bounds read in smtp_setup_msg() Remote CVE-2020-28021 New-line injection into spool header file (remote) Remote CVE-2020-28022 Heap out-of-bounds read and write in extract_option() Remote CVE-2020-28026 Line truncation and injection in spool_read_header() Remote CVE-2020-28019 Failure to reset function pointer after BDAT error Remote CVE-2020-28024 Heap buffer underflow in smtp_ungetc() Remote CVE-2020-28018 Use-after-free in tls-openssl.c Remote CVE-2020-28025 Heap out-of-bounds read in pdkim_finish_bodyhash() Remote Previous Exim bugs have been broadly abused in the past
No previous article
No new articles
Catalin Cimpanu
is a cybersecurity reporter who previously worked at ZDNet and Bleeping Computer, where he became a well-known name in the industry for his constant scoops on new vulnerabilities, cyberattacks, and law enforcement actions against hackers.
Text extracted automatically; images, tables and formatting may be missing. Original: https://therecord.media/21nails-vulnerabilities-impact-60-of-the-internets-email-servers