Quantum Secular Labs / Blog / Advisories
CVE-2018-6789: Exim Buffer Overflow Vulnerability
CVE-2018-6789 is rated critical with a CVSS v3.1 base score of 9.8 and affects Exim Exim, along with 2 other products in NVD’s configuration data. Per its scoring, it can be exploited over the network, without authentication, without any user interaction. The scored impact on confidentiality, integrity and availability is the highest available. CISA added it to its Known Exploited Vulnerabilities catalog on 2021-11-03, which means exploitation in the wild has been observed.
Vulnerability description
An issue was discovered in the base64d function in the SMTP listener in Exim before 4.90.1. By sending a handcrafted message, a buffer overflow may happen. This can be used to execute code remotely.
Severity breakdown
CVSS v3.1 9.8: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector: Network. Exploitable remotely over the network, with no need for local or physical access.
- Attack complexity: Low. No special conditions; the attack can be repeated reliably.
- Privileges required: None. No account or prior access is needed.
- User interaction: None. No action from any user is needed.
- Scope: Unchanged. Impact stays within the vulnerable component.
- Confidentiality impact: High. Total loss of confidentiality; sensitive data can be fully disclosed.
- Integrity impact: High. Total loss of integrity; data or system state can be fully modified.
- Availability impact: High. Total loss of availability; the component can be shut down.
Underlying weakness
CWE-120: Buffer Copy without Checking Size of Input
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.
Affected products
- Exim: before 4.90.1
- Debian Linux: 7.0; 8.0; 9.0
- Canonical Ubuntu Linux: 14.04; 16.04; 17.10
References
- https://git.exim.org/exim.git/commit/cf3cd306062a08969c41a1cdd32c6855f1abecf1
- https://exim.org/static/doc/security/CVE-2018-6789.txt
- http://openwall.com/lists/oss-security/2018/02/10/2
- http://packetstormsecurity.com/files/162959/Exim-base64d-Buffer-Overflow.html
- http://www.openwall.com/lists/oss-security/2018/02/07/2
- http://www.securityfocus.com/bid/103049
- http://www.securitytracker.com/id/1040461
- https://devco.re/blog/2018/03/06/exim-off-by-one-RCE-exploiting-CVE-2018-6789-en/
- https://lists.debian.org/debian-lts-announce/2018/02/msg00009.html
- https://usn.ubuntu.com/3565-1/
- https://www.debian.org/security/2018/dsa-4110
- https://www.exploit-db.com/exploits/44571/
- https://www.exploit-db.com/exploits/45671/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2018-6789