# CVE-2023-42118: Exim libspf2 Integer Underflow Remote Code Execution Vulnerability

- Severity: High 7.5 (CVSS:3.0, scored by zdi) `CVSS:3.0/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 8.35%, higher than 95% of CVEs (2026-12-01)
- Published: 2024-05-03T02:13:26.055Z
- Modified: 2026-06-17T06:23:30.000Z
- Weaknesses: CWE-191
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: zdi

## Description

Exim libspf2 Integer Underflow Remote Code Execution Vulnerability. This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of Exim libspf2. Authentication is not required to exploit this vulnerability. 

The specific flaw exists within the parsing of SPF macros. When parsing SPF macros, the process does not properly validate user-supplied data, which can result in an integer underflow before writing to memory. An attacker can leverage this vulnerability to execute code in the context of the service account.
. Was ZDI-CAN-17578.

(As written by CVE List.)

## Affected

- Exim libspf2: exim 4.96-RC0-14-24b8ed847-XX; before *
- libspf2_project libspf2: no versions given

## Every score

- zdi: CVSS:3.0 7.5 High `CVSS:3.0/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://www.zerodayinitiative.com/advisories/ZDI-23-1472/> (third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2025/03/28/1> (mailing-list)

## Sources

- CVE List: [CVE-2023-42118](https://www.cve.org/CVERecord?id=CVE-2023-42118), CVE Terms of Use, modified 2025-03-28
- NVD: [CVE-2023-42118](https://nvd.nist.gov/vuln/detail/CVE-2023-42118), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-42118 · Whole record: https://cve.day/CVE-2023-42118.json · Rebuilt by cve.day 2026-11-25T22:58:33.802Z
