CVE-2017-1000369
Medium · 4.0CVSS
4.0
EPSS
0.5%
Published
Jun 19, 2017
CISA due date
—
Cloudanix analysis
A problem in the Exim email server lets attackers run their own programs on the machine by supplying certain command options in a repeated way.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Exim's handling of multiple -p command line arguments results in repeated malloc allocations that are never freed, enabling memory corruption that can be chained with other issues to achieve arbitrary code execution on affected versions 4.89 and earlier.
Why it matters to the business
Compromised mail servers could allow attackers to run malicious code, risking email data exposure, service outages, or use as an entry point for further network access; the issue has been public for years with minimal observed exploitation.
How an attack unfolds
An attacker invokes the Exim binary locally or via a wrapper with repeated -p arguments; the resulting unfreed allocations are leveraged alongside other memory issues to corrupt control structures and redirect execution to attacker-controlled code.
How to fix it
Upgrade exim/exim to the commit 65e061b76867a9ea7aeeb535341b790b90ae6c21 or later; for Chainguard and Wolfi kargo packages, ensure the fixed version 0 or newer is deployed.
How to confirm the fix worked
Confirm the installed Exim binary reports a version containing commit 65e061b76867a9ea7aeeb535341b790b90ae6c21; review build logs or package manifests to verify the patch is present.
Typical attack path
- Invoke Exim with multiple -p command line arguments
- Trigger repeated malloc without corresponding free operations
- Combine with additional memory corruption primitives
- Achieve arbitrary code execution within the Exim process
How to detect it
Search process execution and command-line audit logs for Exim invocations containing multiple -p flags; examine core dumps or memory traces for patterns of repeated allocations without frees around Exim startup.
- exim.*-p.*-p
- multiple -p arguments in exim command line
What your security team should do
- Apply the referenced upstream commit or updated package immediately on all Exim deployments
- Restrict local access to the Exim binary to only trusted users and processes
- Audit command-line invocation logs for repeated -p arguments
- Replace Exim with a maintained MTA if long-term support is uncertain
The record
Exim supports the use of multiple "-p" command line arguments which are malloc()'ed and never free()'ed, used in conjunction with other issues allows attackers to cause arbitrary code execution. This affects exim version 4.89 and earlier. Please note that at this time upstream has released a patch (commit 65e061b76867a9ea7aeeb535341b790b90ae6c21), but it is not known if a new point release is available that addresses this issue at this time.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | exim4 | 0 | 4.89-3 |
| Debian:12 | exim4 | 0 | 4.89-3 |
| Debian:13 | exim4 | 0 | 4.89-3 |
| Debian:7 | exim4 | 0 | 4.80-7+deb7u5 |
| Debian:8 | exim4 | 0 | 4.84.2-2+deb8u4 |
| Debian:9 | exim4 | 0 | 4.89-2+deb9u1 |
| SUSE:Package Hub 15 SP1 | exim | 0 | 4.94.2-bp151.2.4.1 |
| SUSE:Package Hub 15 SP1 | libspf2 | 0 | 1.2.10-bp151.4.1 |
| SUSE:Package Hub 15 SP2 | exim | 0 | 4.94.2-bp152.6.4.1 |
| SUSE:Package Hub 15 SP2 | libspf2 | 0 | 1.2.10-bp152.5.1 |
| Ubuntu:14.04:LTS | exim4 | 0 | 4.82-3ubuntu2.3 |
| Ubuntu:16.04:LTS | exim4 | 0 | 4.86.2-2ubuntu2.2 |
| openSUSE:Leap 15.2 | exim | 0 | 4.94.2-lp152.8.3.1 |
| openSUSE:Tumbleweed | exim | 0 | 4.94.2-4.2 |
Related vulnerabilities
- CVE-2023-42115 Exim AUTH Out-Of-Bounds Write Remote Code Execution Vulnerability. Also affects exim4
- CVE-2023-42117 Exim Improper Neutralization of Special Elements Remote Code Execution Vulnerability. Also affects exim4
- CVE-2023-42116 Exim SMTP Challenge Stack-based Buffer Overflow Remote Code Execution Vulnerability. Also affects exim4
- CVE-2023-42119 Exim dnsdb Out-Of-Bounds Read Information Disclosure Vulnerability. Also affects exim4
- CVE-2023-42114 Exim NTLM Challenge Out-Of-Bounds Read Information Disclosure Vulnerability. Also affects exim4
- CVE-2022-3559 A vulnerability was found in Exim and classified as problematic. Also affects exim4
- CVE-2017-16944 The receive_msg function in receive.c in the SMTP daemon in Exim 4.88 and 4.89 allows… Also affects exim4
- CVE-2017-16943 The receive_msg function in receive.c in the SMTP daemon in Exim 4.88 and 4.89 allows… Also affects exim4