Every CVE Search/ Get API key

CVE-2021-33913

libspf2 before 1.2.11 has a heap-based buffer overflow that might allow remote attackers to...

9.8 CriticalFix available

libspf2 before 1.2.11 has a 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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

9.64%Up 8.2 points since Jan 20, 2022
90%50%10%1%

What each source reports

NVD Score used 9.8

libspf2 before 1.2.11 has a 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-33913
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
9.3 HighAV: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 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-33913
Updated
2026-11-02
EUVDEUVD-2021-20585 No score

libspf2 before 1.2.11 has a 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-20585
Updated
2026-11-03
GitHub AdvisoriesGHSA-7659-433m-4fhx 9.8

libspf2 before 1.2.11 has a heap-based buffer overflow that might allow remote attackers to...

libspf2 before 1.2.11 has a 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-7659-433m-4fhx
CVSS 3.1
9.8 CriticalCVSS: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-33913 9.8

libspf2 before 1.2.11 has a 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-33913
CVSS 3.1
9.8 CriticalCVSS: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 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-33913
CVSS 3.1
9.8 CriticalCVSS: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-33913 9.8

libspf2 before 1.2.11 has a 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-33913
CVSS 3.1
9.8 CriticalCVSS: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-33913 9.8

libspf2 before 1.2.11 has a 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 SPF_record_expand_data in spf_expand.c. The amount of overflowed data depends on the relationship between the length of an entire domain name and the length of its leftmost label. 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-33913
CVSS 3.1
9.8 CriticalCVSS: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

Affected packages
PackageAffectedFixed
libspf2
Alpine:v3.14
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.15
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.16
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.17
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.18
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.19
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.20
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.21
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.22
before 1.2.11-r0
1.2.11-r0
libspf2
Alpine:v3.23
before 1.2.11-r0
1.2.11-r0
Show 12 moreShow less
Affected packages
PackageAffectedFixed
libspf2
Alpine:v3.24
before 1.2.11-r0
1.2.11-r0
libspf2
Debian:12
before 1.2.10-7.1
1.2.10-7.1
libspf2
Debian:13
before 1.2.10-7.1
1.2.10-7.1
libspf2
Debian:14
before 1.2.10-7.1
1.2.10-7.1
libspf2
Debian: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
libspf2
Ubuntu: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
libspf2
Ubuntu: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
libspf2
Ubuntu: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
libspf2
Ubuntu: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
libspf2
Ubuntu: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
libspf2
Ubuntu: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
libspf2
Ubuntu: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

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-33913 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

Show 9 moreShow less
MoveEnter Open