Vulnerabilities / CVE-2021-33912

critical

CVE-2021-33912

libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that ...

Published Modified CWE 787
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by Ubuntu (medium).

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.

Affected packages and fixed versions

SourcePackageFixed in
alpine 3.14libspf21.2.11-r0
alpine 3.15libspf21.2.11-r0
alpine 3.16libspf21.2.11-r0
alpine 3.17libspf21.2.11-r0
alpine 3.18libspf21.2.11-r0
alpine 3.19libspf21.2.11-r0
alpine 3.20libspf21.2.11-r0
alpine 3.21libspf21.2.11-r0
alpine 3.22libspf21.2.11-r0
alpine 3.23libspf21.2.11-r0
alpine 3.24libspf21.2.11-r0
alpine edgelibspf21.2.11-r0
Show all 23 entries from 23 sources
SourcePackageFixed in
alpine 3.14libspf21.2.11-r0
alpine 3.15libspf21.2.11-r0
alpine 3.16libspf21.2.11-r0
alpine 3.17libspf21.2.11-r0
alpine 3.18libspf21.2.11-r0
alpine 3.19libspf21.2.11-r0
alpine 3.20libspf21.2.11-r0
alpine 3.21libspf21.2.11-r0
alpine 3.22libspf21.2.11-r0
alpine 3.23libspf21.2.11-r0
alpine 3.24libspf21.2.11-r0
alpine edgelibspf21.2.11-r0
debian 10libspf21.2.10-7.1~deb10u1
debian 11libspf21.2.10-7.1~deb11u1
debian 12libspf21.2.10-7.1
debian 13libspf21.2.10-7.1
debian 14libspf21.2.10-7.1
debian 9libspf21.2.10-7+deb9u2
echolibspf21.2.10-7.1
ubuntu 16.04-ESMlibspf21.2.10-6ubuntu0.1~esm2
ubuntu 18.04-ESMlibspf21.2.10-7ubuntu0.18.04.1~esm1
ubuntu 20.04libspf21.2.10-7+deb9u2build0.20.04.1
ubuntu 20.04-ESMlibspf21.2.10-7+deb9u2build0.20.04.1

References

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.