Cloudanix VulnDB

CVE-2023-42115

Critical · 9.8

CVSS

9.8

EPSS

12.1%

Published

May 3, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A serious flaw in the Exim email server lets remote attackers take full control of the system without any login, risking theft or disruption of email services.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Network Service
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

Out-of-bounds write in Exim SMTP AUTH command processing on TCP port 25 allows remote unauthenticated attackers to overwrite memory and execute arbitrary code in the service account context.

Why it matters to the business

Successful exploitation can fully compromise mail servers, leading to email interception, data exfiltration, service outages, and potential lateral movement with high urgency due to rising exploit probability.

How an attack unfolds

An unauthenticated remote attacker connects to the exposed SMTP service and submits a crafted AUTH command that bypasses input validation, causing an out-of-bounds write that corrupts adjacent memory structures and redirects execution to attacker-controlled code.

How to fix it

Upgrade all Exim installations to the fixed commit b9e0b12d9b665bbff996382264d4ba97d1a61efd or later; rebuild from the patched GIT source and restart the service.

How to confirm the fix worked

Confirm the running Exim binary was built from a tree containing commit b9e0b12d9b665bbff996382264d4ba97d1a61efd and perform authenticated version checks or fuzzing against the AUTH handler.

Typical attack path

  1. Scan for publicly reachable Exim SMTP listeners on TCP 25
  2. Send malformed AUTH command to trigger the out-of-bounds write
  3. Overwrite return addresses or function pointers with shellcode
  4. Execute arbitrary commands under the Exim service account
  5. Establish persistence or pivot within the environment

How to detect it

Inspect Exim main and panic logs for repeated or malformed AUTH attempts, unexpected process terminations, or memory-corruption related errors around SMTP connections.

What your security team should do

  • Apply the upstream fix immediately given the critical CVSS and increasing EPSS trend
  • Temporarily restrict unauthenticated SMTP access via firewall rules until patched
  • Enable enhanced logging of AUTH commands and monitor for service crashes
  • Scan the environment for any remaining vulnerable Exim versions

The record

Exim AUTH Out-Of-Bounds Write Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Exim. Authentication is not required to exploit this vulnerability. The specific flaw exists within the smtp service, which listens on TCP port 25 by default. The issue results from the lack of proper validation of user-supplied data, which can result in a write past the end of a buffer. An attacker can leverage this vulnerability to execute code in the context of the service account. Was ZDI-CAN-17434.

Affected packages

Ecosystem Package Introduced Fixed
Chainguard exim 0 4.96.1-r0
Chainguard exim-cdb 0 4.96.1-r0
Chainguard exim-dbmdb 0 4.96.1-r0
Chainguard exim-dnsdb 0 4.96.1-r0
Chainguard exim-doc 0 4.96.1-r0
Chainguard exim-mysql 0 4.96.1-r0
Chainguard exim-pgsql 0 4.96.1-r0
Chainguard exim-scripts 0 4.96.1-r0
Chainguard exim-sqlite 0 4.96.1-r0
Chainguard exim-utils 0 4.96.1-r0
Debian:11 exim4 0 4.94.2-7+deb11u1
Debian:12 exim4 0 4.96-15+deb12u2
Debian:13 exim4 0 4.97~RC1-2
SUSE:Package Hub 15 SP4 exim 0 4.94.2-bp155.5.3.1
SUSE:Package Hub 15 SP5 exim 0 4.94.2-bp155.5.3.1
SUSE:Package Hub 15 SP5 exim 0 4.97.1-bp155.5.9.1
Ubuntu:20.04:LTS exim4 0 4.93-13ubuntu1.8
Ubuntu:22.04:LTS exim4 0 4.95-4ubuntu2.3
Ubuntu:Pro:14.04:LTS exim4 0 4.82-3ubuntu2.4+esm6
Ubuntu:Pro:16.04:LTS exim4 0 4.86.2-2ubuntu2.6+esm4
Ubuntu:Pro:18.04:LTS exim4 0 4.90.1-1ubuntu1.10+esm1
Wolfi exim 0 4.96.1-r0
Wolfi exim-cdb 0 4.96.1-r0
Wolfi exim-dbmdb 0 4.96.1-r0
Wolfi exim-dnsdb 0 4.96.1-r0
Wolfi exim-doc 0 4.96.1-r0
Wolfi exim-mysql 0 4.96.1-r0
Wolfi exim-pgsql 0 4.96.1-r0
Wolfi exim-scripts 0 4.96.1-r0
Wolfi exim-sqlite 0 4.96.1-r0
Wolfi exim-utils 0 4.96.1-r0
openSUSE:Leap 15.4 exim 0 4.94.2-bp155.5.3.1
openSUSE:Leap 15.5 exim 0 4.94.2-bp155.5.3.1
openSUSE:Leap 15.5 exim 0 4.97.1-bp155.5.9.1
openSUSE:Tumbleweed exim 0 4.96.1-1.1

Related vulnerabilities