CVE-2021-33912
libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that might allow remote...
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2021-33912- 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 - CVSS 2.0
- 9.3 High
AV:N/AC:M/Au:N/C:C/I:C/A:C - Weakness
- CWE-787
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2021-33912- Updated
- 2026-11-02
EUVDEUVD-2021-20584 No score
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.
- Record
EUVD-2021-20584- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f8wp-q2v8-9hc2
9.8
libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that might allow remote...
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.
- Record
GHSA-f8wp-q2v8-9hc2- 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 - Weakness
- CWE-787
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-33912
9.8
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.
- Record
ALPINE-CVE-2021-33912- 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 - Updated
- 2026-11-02
OSV
9.8
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.
- Record
CVE-2021-33912- 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 - Updated
- 2026-11-02
Show 4 moreShow less
OSVDEBIAN-CVE-2021-33912
9.8
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.
- Record
DEBIAN-CVE-2021-33912- 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 - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-33912
9.8
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.
- Record
UBUNTU-CVE-2021-33912- 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 - Updated
- 2026-11-02
OSVUSN-6584-1 No score
libspf2 vulnerabilities
Philipp Jeitner and Haya Shulman discovered that Libspf2 incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-20314)
It was discovered that Libspf2 incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-33912, CVE-2021-33913)
- Record
USN-6584-1- Updated
- 2026-11-02
OSVUSN-6584-2 No score
libspf2 vulnerabilities
USN-6584-1 fixed several vulnerabilities in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. This update provides the corresponding updates for CVE-2021-33912 and CVE-2021-33913 in Ubuntu 16.04 LTS.
We apologize for the inconvenience.
Original advisory details:
Philipp Jeitner and Haya Shulman discovered that Libspf2 incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-20314)
It was discovered that Libspf2 incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-33912, CVE-2021-33913)
- Record
USN-6584-2- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libspf2Alpine:v3.14 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.15 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.16 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.17 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.18 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.19 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.20 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.21 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.22 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Alpine:v3.23 |
before 1.2.11-r0 | 1.2.11-r0 |
Show 12 moreShow less
| Package | Affected | Fixed |
|---|---|---|
libspf2Alpine:v3.24 |
before 1.2.11-r0 | 1.2.11-r0 |
libspf2Debian:12 |
before 1.2.10-7.1 | 1.2.10-7.1 |
libspf2Debian:13 |
before 1.2.10-7.1 | 1.2.10-7.1 |
libspf2Debian:14 |
before 1.2.10-7.1 | 1.2.10-7.1 |
libspf2Debian:9 From an advisory covering 2 CVEs |
before 1.2.10-7+deb9u2, plus listed versions 1.2.10-71.2.10-7+deb9u1 |
1.2.10-7+deb9u2 |
libspf2Ubuntu:Pro:16.04:LTS |
before 1.2.10-6ubuntu0.1~esm2, plus listed versions 1.2.10-61.2.10-6build11.2.10-6ubuntu0.1~esm1 |
1.2.10-6ubuntu0.1~esm2 |
libspf2Ubuntu:Pro:18.04:LTS |
before 1.2.10-7ubuntu0.18.04.1~esm1, plus listed versions 1.2.10-7build2 |
1.2.10-7ubuntu0.18.04.1~esm1 |
libspf2Ubuntu:20.04:LTS |
before 1.2.10-7+deb9u2build0.20.04.1, plus listed versions 1.2.10-7build31.2.10-7build4 |
1.2.10-7+deb9u2build0.20.04.1 |
libspf2Ubuntu:Pro:16.04:LTS From an advisory covering 3 CVEs |
before 1.2.10-6ubuntu0.1~esm1, plus listed versions 1.2.10-61.2.10-6build1 |
1.2.10-6ubuntu0.1~esm1 |
libspf2Ubuntu:Pro:18.04:LTS From an advisory covering 3 CVEs |
before 1.2.10-7ubuntu0.18.04.1~esm1, plus listed versions 1.2.10-7build2 |
1.2.10-7ubuntu0.18.04.1~esm1 |
libspf2Ubuntu:20.04:LTS From an advisory covering 3 CVEs |
before 1.2.10-7+deb9u2build0.20.04.1, plus listed versions 1.2.10-7build31.2.10-7build4 |
1.2.10-7+deb9u2build0.20.04.1 |
libspf2Ubuntu:Pro:16.04:LTS From an advisory covering 2 CVEs |
before 1.2.10-6ubuntu0.1~esm2, plus listed versions 1.2.10-61.2.10-6build11.2.10-6ubuntu0.1~esm1 |
1.2.10-6ubuntu0.1~esm2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-33912 is a critical vulnerability (CVSS 9.8) in Libspf2 Project Libspf2, published January 19, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 9.64%, the 95th percentile. Fixed in libspf2 1.2.11-r0.
References
github.com/shevek/libspf2/tree/8131fe140704eaae695e76b5cd09e39bd1dd220b
nathanielbennett.com/blog/libspf2-cve-jan-2022-disclosure
lists.debian.org/debian-lts-announce/2022/01/msg00015.html
security.gentoo.org/glsa/202401-22
nvd.nist.gov/vuln/detail/CVE-2021-33912
github.com/advisories/GHSA-f8wp-q2v8-9hc2
Show 9 moreShow less
security.alpinelinux.org/vuln/CVE-2021-33912
security-tracker.debian.org/tracker/CVE-2021-33912
ubuntu.com/security/CVE-2021-33912
github.com/shevek/libspf2/commit/28faf4624a6a371b11afdb9820078d3b0ee3803d
ubuntu.com/security/notices/USN-6584-1
ubuntu.com/security/notices/USN-6584-2
cve.org/CVERecord?id=CVE-2021-33912
ubuntu.com/security/CVE-2021-20314
ubuntu.com/security/CVE-2021-33913