OS Command Injection in Exim - CVE-2019-10149
Published: June 5, 2019 / Updated: February 20, 2022
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.
The vulnerability exists due to insufficient validation of email address within the deliver_message() function in /src/deliver.c. A remote unauthenticated attacker can send an email containing a specially crafted email address and execute arbitrary OS commands on the target system via execv() call with superuser privileges.
This vulnerability can be also exploited by authenticated local users to escalate privileges on the system.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
Arch Linux
Gentoo Linux
Opensuse
exim4 (Ubuntu package)
exim (Alpine package)
exim4 (Debian package)
How to mitigate CVE-2019-10149
exim4 (Ubuntu package) - addressed in versions 4.90.1-1ubuntu1.2, 4.91-6ubuntu1.1
exim (Alpine package) - update to 4.91-r2
exim4 (Debian package) - update to 4.89-2+deb9u4
Links to Public Exploits and PoC-codes
- Exploit #6583 - CVE-2019-10149-Exploit (Exploit for CVE-2019-10149) (July 29, 2021)
- Exploit #6056 - Exim 4.87 / 4.91 - Local Privilege Escalation (Metasploit) (June 17, 2021)
- Exploit #6071 - Exim 4.87 - 4.91 - Local Privilege Escalation (June 17, 2021)
- Exploit #6014 - Exim 4.87 < 4.91 - (Local / Remote) Command Execution (June 17, 2021)
- Exploit #259 - StickyExim (Exim Honey Pot for CVE-2019-10149 exploit attempts.) (March 18, 2020)
- Exploit #260 - exploits (Some personal exploits/pocs) (March 18, 2020)
- Exploit #1564 - Exim 4.87 - 4.91 Local Privilege Escalation (March 18, 2020)
- Exploit #1863 - CVE-2019-10149 (CVE-2019-10149 : A flaw was found in Exim versions 4.87 to 4.91 (inclusive). Improper validation of recipient address in deliver_message() function in /src/deliver.c may lead to remote command execution.) (March 18, 2020)