CVE-2023-42118: Exim libspf2 SPF Macro Integer Underflow Remote Code Execution
- Vendors
- Libspf2 ProjectExim
CVE-2023-42118 is an integer underflow vulnerability in the libspf2 library used by Exim. Insufficient validation of attacker-controlled SPF macros can cause an integer underflow before a memory write, enabling arbitrary code execution in the Exim service account context. Exploitation requires Exim to use the SPF condition in an access-control list. The vulnerability is exploitable by a network-adjacent attacker without authentication or user interaction.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can compromise the confidentiality, integrity, and availability of resources accessible to the Exim service account. Arbitrary code execution could allow access to mail data, modification of service-accessible information, and disruption of mail processing. The assigned CVSS v3.1 score is 7.5, with vector AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
Mitigation
If you can’t patch tonight, do this now.
Disable use of the SPF condition in Exim access-control lists to avoid invoking the vulnerable processing path. Restrict network access to the Exim service to trusted systems wherever operationally feasible.
Remediation
Patch, then assume compromise.
A verified upstream fixed version is not established by the available information. Exim 4.96.1 and 4.97 fixes for other disclosed vulnerabilities must not be assumed to resolve CVE-2023-42118. cPanel introduced an intended mitigation in cpanel-libspf2-1.2.11-2, but confirmation that it addressed the reported flaw was pending. Follow the applicable vendor's guidance and install an update explicitly confirmed to address this CVE when available.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2023-42118 exploited in the wild?
- Yes. As of Oct 22, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2023-42118?
- As of Oct 22, 2026, Mallory has found no public exploit for CVE-2023-42118.
- Is there a patch for CVE-2023-42118?
- A verified upstream fixed version is not established by the available information. Exim 4.96.1 and 4.97 fixes for other disclosed vulnerabilities must not be assumed to resolve CVE-2023-42118. cPanel introduced an intended mitigation in cpanel-libspf2-1.2.11-2, but confirmation that it addressed the reported flaw was pending.
- What products are affected by CVE-2023-42118?
- Exim Libspf2 and Libspf2 Project Libspf2.
- How severe is CVE-2023-42118?
- CVE-2023-42118 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 8.4% (95th percentile) as of Oct 22, 2026.
Recent activity
8 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.