# CVE-2021-33912: libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that might allow remote attackers to execute arbitrary code (via an unauth…

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/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): 10.3%, higher than 95% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-19T00:00:00.000Z
- Modified: 2026-06-17T03:55:22.187Z
- Weaknesses: CWE-787
- Assigned by: mitre

## Description

libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that might allow remote attackers to execute arbitrary code (via an unauthenticated e-mail message from anywhere on the Internet) with a crafted SPF DNS record, because of incorrect sprintf usage in SPF_record_expand_data in spf_expand.c. The vulnerable code may be part of the supply chain of a site's e-mail infrastructure (e.g., with additional configuration, Exim can use libspf2; the Postfix web site links to unofficial patches for use of libspf2 with Postfix; older versions of spfquery relied on libspf2) but most often is not.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- libspf2_project libspf2: before 1.2.11
- debian debian_linux: 9.0

## Every score

- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 9.3 High `AV:N/AC:M/Au:N/C:C/I:C/A:C`

## References

- <https://nathanielbennett.com/blog/libspf2-cve-jan-2022-disclosure> (exploit, third-party-advisory)
- <https://github.com/shevek/libspf2/tree/8131fe140704eaae695e76b5cd09e39bd1dd220b> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2022/01/msg00015.html> (mailing-list, third-party-advisory)
- <https://security.gentoo.org/glsa/202401-22> (vendor-advisory)

## Sources

- CVE List: [CVE-2021-33912](https://www.cve.org/CVERecord?id=CVE-2021-33912), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-33912](https://nvd.nist.gov/vuln/detail/CVE-2021-33912), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-33912 · Whole record: https://cve.day/CVE-2021-33912.json · Rebuilt by cve.day 2026-11-25T22:58:06.587Z
