CVE-2017-16844
Critical · 9.8CVSS
9.8
EPSS
12.5%
Published
Nov 16, 2017
CISA due date
—
Cloudanix analysis
A flaw in an old email filtering program lets attackers send specially made messages that can crash the program or take control of the server handling mail.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in the loadbuf function triggered by a hardcoded realloc size when processing a crafted email message, enabling denial of service or arbitrary code execution.
Why it matters to the business
Remote compromise of email processing servers handling inbound mail, potentially allowing attackers to run code, exfiltrate data, or pivot into internal systems; procmail's unmaintained status and lack of patches increase long-term exposure for organizations still relying on it.
How an attack unfolds
An attacker crafts an email message that exceeds the hardcoded buffer size in formail's loadbuf function, causing a heap overflow when the message is processed by procmail; successful exploitation can yield remote code execution without authentication.
How to fix it
Remove or replace procmail with a maintained mail filtering solution such as maildrop, postfix with built-in filtering, or modern MDA tools; audit and disable any remaining procmail invocations in mail delivery pipelines.
How to confirm the fix worked
Inventory all systems invoking procmail or formail, confirm version strings via package managers or binary inspection, and verify that no mail flows still route through the vulnerable binary.
Typical attack path
- Craft a malicious email payload designed to trigger the hardcoded realloc in loadbuf
- Deliver the message via SMTP to a recipient whose mail flow invokes procmail and formail
- Trigger processing of the message body or headers in formisc.c
- Achieve memory corruption leading to crash or arbitrary code execution
How to detect it
Review mail server logs for repeated procmail or formail crashes, unusually large or malformed message deliveries, and any child process anomalies following email receipt; correlate with SMTP logs showing inbound messages from untrusted sources.
What your security team should do
- Immediately inventory and isolate any remaining procmail deployments
- Migrate mail filtering logic to supported alternatives before the next audit cycle
- Add mail server logging for abnormal formail crashes or oversized message processing
- Block or sandbox legacy procmail binaries in production environments
The record
Heap-based buffer overflow in the loadbuf function in formisc.c in formail in procmail 3.22 allows remote attackers to cause a denial of service (application crash) or possibly execute arbitrary code via a crafted e-mail message because of a hardcoded realloc size, a different vulnerability than CVE-2014-3618.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | procmail | 0 | 3.22-26 |
| Debian:12 | procmail | 0 | 3.22-26 |
| Debian:13 | procmail | 0 | 3.22-26 |
| Debian:7 | procmail | 0 | 3.22-20+deb7u2 |
| Debian:8 | procmail | 0 | 3.22-24+deb8u1 |
| Debian:9 | procmail | 0 | 3.22-25+deb9u1 |
| Red Hat:enterprise_linux:7::client | procmail | 0 | 0:3.22-36.el7_4.1 |
| Red Hat:enterprise_linux:7::client | procmail-debuginfo | 0 | 0:3.22-36.el7_4.1 |
| Red Hat:enterprise_linux:7::server | procmail | 0 | 0:3.22-36.el7_4.1 |
| Red Hat:enterprise_linux:7::server | procmail-debuginfo | 0 | 0:3.22-36.el7_4.1 |
| Red Hat:enterprise_linux:7::workstation | procmail | 0 | 0:3.22-36.el7_4.1 |
| Red Hat:enterprise_linux:7::workstation | procmail-debuginfo | 0 | 0:3.22-36.el7_4.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | procmail | 0 | 3.22-269.3.5 |
| SUSE:Linux Enterprise Desktop 12 SP3 | procmail | 0 | 3.22-269.3.5 |
| SUSE:Linux Enterprise Server 11 SP4 | procmail | 0 | 3.22-240.8.3.1 |
| SUSE:Linux Enterprise Server 12 SP2 | procmail | 0 | 3.22-269.3.5 |
| SUSE:Linux Enterprise Server 12 SP3 | procmail | 0 | 3.22-269.3.5 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | procmail | 0 | 3.22-269.3.5 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | procmail | 0 | 3.22-240.8.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | procmail | 0 | 3.22-269.3.5 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | procmail | 0 | 3.22-269.3.5 |
| Ubuntu:14.04:LTS | procmail | 0 | 3.22-21ubuntu0.2 |
| Ubuntu:16.04:LTS | procmail | 0 | 3.22-25ubuntu0.16.04.1 |
| openSUSE:Tumbleweed | procmail | 0 | 3.22-277.3 |
Related vulnerabilities
- CVE-2014-3618 Heap-based buffer overflow in formisc.c in formail in procmail 3.22 allows remote… Also affects procmail
- CVE-2026-112108 A vulnerability was determined in ztxz16 fastllm up to 0.1.8.2. CWE-119
- CVE-2026-112073 A vulnerability was identified in Tencent ncnn up to 44b02dabdcf97499281a4692ebd65bad73dc… CWE-119
- CVE-2026-90831 A vulnerability was detected in GNU Binutils 2.47. CWE-119
- CVE-2026-90804 A vulnerability was detected in GNU Binutils 2.47. CWE-119
- CVE-2026-90803 A security vulnerability has been detected in GNU Binutils 2.47. CWE-119
- CVE-2026-90801 A security flaw has been discovered in GNU Binutils 2.47. CWE-119
- CVE-2026-87933 A vulnerability was found in DaveGamble cJSON up to 1.7.19. CWE-119