Skip to content

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

CriticalCVSS 9.8 EPSS 10.3%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebian

Description

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.

Upgrade path

18 packages: 18 fixed.

PackageAffectedFixed inStatus
alpine/libspf2(Alpine v3.14) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.15) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.16) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.17) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.18) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.19) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.20) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.21) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.22) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.23) < 1.2.11-r0 1.2.11-r0 Fixed
alpine/libspf2(Alpine v3.24) < 1.2.11-r0 1.2.11-r0 Fixed
debian/libspf2(Debian 12) < 1.2.10-7.1 1.2.10-7.1 Fixed
debian/libspf2(Debian 13) < 1.2.10-7.1 1.2.10-7.1 Fixed
debian/libspf2(Debian 14) < 1.2.10-7.1 1.2.10-7.1 Fixed
libspf2 project libspf2 < 1.2.11 1.2.11 Fixed
ubuntu/libspf2(Ubuntu 20.04) < 1.2.10-7+deb9u2build0.20.04.1; = 1.2.10-7build3; = 1.2.10-7build4 1.2.10-7+deb9u2build0.20.04.1 Fixed
ubuntu/libspf2(Ubuntu Pro 16.04) < 1.2.10-6ubuntu0.1~esm2; = 1.2.10-6; = 1.2.10-6build1; = 1.2.10-6ubuntu0.1~esm1 1.2.10-6ubuntu0.1~esm2 Fixed
ubuntu/libspf2(Ubuntu Pro 18.04) < 1.2.10-7ubuntu0.18.04.1~esm1; = 1.2.10-7build2 1.2.10-7ubuntu0.18.04.1~esm1 Fixed

Affected products

ProductAffected versionsFixed in
debian/libspf2(Debian:12) < 1.2.10-7.1 1.2.10-7.1
debian/libspf2(Debian:13) < 1.2.10-7.1 1.2.10-7.1
debian/libspf2(Debian:14) < 1.2.10-7.1 1.2.10-7.1
libspf2 project libspf2 < 1.2.11 1.2.11
alpine/libspf2(Alpine:v3.14) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.15) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.16) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.17) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.18) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.19) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.20) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.21) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.22) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.23) < 1.2.11-r0 1.2.11-r0
alpine/libspf2(Alpine:v3.24) < 1.2.11-r0 1.2.11-r0
ubuntu/libspf2(Ubuntu:Pro:16.04) < 1.2.10-6ubuntu0.1~esm2 1.2.10-6ubuntu0.1~esm2
ubuntu/libspf2(Ubuntu:Pro:16.04) = 1.2.10-6 No fix listed
ubuntu/libspf2(Ubuntu:Pro:16.04) = 1.2.10-6build1 No fix listed
ubuntu/libspf2(Ubuntu:Pro:16.04) = 1.2.10-6ubuntu0.1~esm1 No fix listed
ubuntu/libspf2(Ubuntu:Pro:18.04) < 1.2.10-7ubuntu0.18.04.1~esm1 1.2.10-7ubuntu0.18.04.1~esm1
ubuntu/libspf2(Ubuntu:Pro:18.04) = 1.2.10-7build2 No fix listed
ubuntu/libspf2(Ubuntu:20.04) < 1.2.10-7+deb9u2build0.20.04.1 1.2.10-7+deb9u2build0.20.04.1
ubuntu/libspf2(Ubuntu:20.04) = 1.2.10-7build3 No fix listed
ubuntu/libspf2(Ubuntu:20.04) = 1.2.10-7build4 No fix listed

References