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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libspf2 | 1.2.10-7.1 | — |
| Debian 13 | libspf2 | 1.2.10-7.1 | — |
| Debian 12 | libspf2 | 1.2.10-7.1 | — |
| Debian 9 | libspf2 | 1.2.10-7+deb9u2 | DLA-2890-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | libspf2 | 1.2.10-7+deb9u2build0.20.04.1 | USN-6584-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | libspf2 | 1.2.10-7ubuntu0.18.04.1~esm1 | USN-6584-1 |
| Ubuntu Pro 16.04 LTS | libspf2 | 1.2.10-6ubuntu0.1~esm2 | USN-6584-2, USN-6584-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.23 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.22 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.21 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.20 | libspf2 | 1.2.11-r0 | — |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.18 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.17 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.16 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.15 | libspf2 | 1.2.11-r0 | — |
| Alpine v3.14 | libspf2 | 1.2.11-r0 | — |
Advisories 3
- USN-6584-1 libspf2 vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- USN-6584-2 libspf2 vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DLA-2890-1 libspf2 - security update Debian Security (DSA / DLA) · Mar 9, 2026