CVE-2021-33912
publishedlibspf2: Four-byte heap-based buffer overflow in SPF_record_expand_data in spf_expand.c
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| Alpine Linux | edge | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Debian | stretch | libspf2 | Advisory build | 1.2.10-7+deb9u2 | DLA-2890-1 |
| Ubuntu | bionic | libmail-spf-xs-perl | Advisory build | 1.2.10-7ubuntu0.18.04.1~esm1 | USN-6584-1 |
| Alpine Linux | v3.14 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.15 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.16 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.17 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
Show 18 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.18 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.19 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.20 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.21 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.22 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.23 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Alpine Linux | v3.24 | libspf2 | Fixed | 1.2.11-r0 | Package fix record |
| Ubuntu | bionic | libspf2 | Advisory build | 1.2.10-7ubuntu0.18.04.1~esm1 | USN-6584-1 |
| Ubuntu | bionic | libspf2-2 | Advisory build | 1.2.10-7ubuntu0.18.04.1~esm1 | USN-6584-1 |
| Ubuntu | bionic | spfquery | Advisory build | 1.2.10-7ubuntu0.18.04.1~esm1 | USN-6584-1 |
| Ubuntu | focal | libmail-spf-xs-perl | Advisory build | 1.2.10-7+deb9u2build0.20.04.1 | USN-6584-1 |
| Ubuntu | focal | libspf2 | Advisory build | 1.2.10-7+deb9u2build0.20.04.1 | USN-6584-1 |
| Ubuntu | focal | libspf2-2 | Advisory build | 1.2.10-7+deb9u2build0.20.04.1 | USN-6584-1 |
| Ubuntu | focal | spfquery | Advisory build | 1.2.10-7+deb9u2build0.20.04.1 | USN-6584-1 |
| Ubuntu | xenial | libmail-spf-xs-perl | Advisory build | 1.2.10-6ubuntu0.1~esm2 | USN-6584-2 |
| Ubuntu | xenial | libspf2 | Advisory build | 1.2.10-6ubuntu0.1~esm2 | USN-6584-2 |
| Ubuntu | xenial | libspf2-2 | Advisory build | 1.2.10-6ubuntu0.1~esm2 | USN-6584-2 |
| Ubuntu | xenial | spfquery | Advisory build | 1.2.10-6ubuntu0.1~esm2 | USN-6584-2 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
1- n/a
References
4- https://github.com/shevek/libspf2/tree/8131fe140704eaae695e76b5cd09e39bd1dd220b
- [debian-lts-announce] 20220121 [SECURITY] [DLA 2890-1] libspf2 security update https://lists.debian.org/debian-lts-announce/2022/01/msg00015.html
- https://nathanielbennett.com/blog/libspf2-cve-jan-2022-disclosure
- GLSA-202401-22 https://security.gentoo.org/glsa/202401-22
Provider assertions
2mitre · cna
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 9c293ad85d9233056340b76fb9d56c13ecb07b7b4019b5995c5134eb9c80224b
- Ingested
- 23 Sep 2026, 07:54:43 UTC
- Source record
- Official CVE record