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 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.
What to do
Likely to be exploited: EPSS gives a 10% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | libspf2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | libspf2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | libspf2 | Fixed | 1.2.10-7+deb9u2build0.20.04.1 | UBUNTU-CVE-2021-33912 |
| Ubuntu 18.04 | libspf2 | Fix pending | 1.2.10-7ubuntu0.18.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-33912 |
| Ubuntu 16.04 | libspf2 | Fix pending | 1.2.10-6ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2021-33912 |
| Debian 14 | libspf2 | Fixed | 1.2.10-7.1 | DEBIAN-CVE-2021-33912 |
| Debian 13 | libspf2 | Fixed | 1.2.10-7.1 | DEBIAN-CVE-2021-33912 |
| Debian 12 | libspf2 | Fixed | 1.2.10-7.1 | DEBIAN-CVE-2021-33912 |
| Alpine Linux 3.24 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.23 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.22 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.21 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.20 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.19 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.18 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.17 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.16 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.15 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
| Alpine Linux 3.14 | libspf2 | Fixed | 1.2.11-r0 | ALPINE-CVE-2021-33912 |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://security.gentoo.org/glsa/202401-22 (vendor-advisory)
References
- https://github.com/shevek/libspf2/tree/8131fe140704eaae695e76b5cd09e39bd1dd220b
- https://nathanielbennett.com/blog/libspf2-cve-jan-2022-disclosure
- https://lists.debian.org/debian-lts-announce/2022/01/msg00015.html
- https://security.gentoo.org/glsa/202401-22
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.