Skip to main content
Mallory
HighVulnerability

CVE-2023-42118: Exim libspf2 SPF Macro Integer Underflow Remote Code Execution

Published May 3, 2024 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS8.4%95th percentile
CISA KEVNoNot listed
In the wildReported1 exploitation record in Mallory
Vendors
Libspf2 ProjectExim
IdentifiersCVE-2023-42118CWE-191 · Integer Underflow (Wrap or…
Also known aszdi_23_1472

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

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.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
Exposure surface

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.

VendorProductType
EximLibspf2application
Libspf2 ProjectLibspf2application
FAQ

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.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.