{"id":"CVE-2021-33912","aliases":["ALPINE-CVE-2021-33912","DEBIAN-CVE-2021-33912","DLA-2890-1","EUVD-2021-20584","GHSA-f8wp-q2v8-9hc2","UBUNTU-CVE-2021-33912","USN-6584-1","USN-6584-2"],"status":"published","title":"libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that might allow remote...","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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.09643,"percentile":0.95551,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-787"],"published":"2022-01-19T00:00:00Z","modified":"2026-10-23T18:02:30Z","fixes":[{"ecosystem":"Alpine:v3.14","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.15","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.16","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.17","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"libspf2","fixed_in":["1.2.11-r0"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"libspf2","fixed_in":["1.2.10-7.1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"libspf2","fixed_in":["1.2.10-7.1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"libspf2","fixed_in":["1.2.10-7.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libspf2","fixed_in":["1.2.10-6ubuntu0.1~esm2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"libspf2","fixed_in":["1.2.10-7ubuntu0.18.04.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"libspf2","fixed_in":["1.2.10-7+deb9u2build0.20.04.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Alpine:v3.14","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.15","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.16","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.11-r0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7.1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7.1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7.1"}]}]},{"source":"osv","ecosystem":"Debian:9","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7+deb9u2"}]}],"versions":["1.2.10-7","1.2.10-7+deb9u1"],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-6ubuntu0.1~esm2"}]}],"versions":["1.2.10-6","1.2.10-6build1","1.2.10-6ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7ubuntu0.18.04.1~esm1"}]}],"versions":["1.2.10-7build2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7+deb9u2build0.20.04.1"}]}],"versions":["1.2.10-7build3","1.2.10-7build4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-6ubuntu0.1~esm1"}]}],"versions":["1.2.10-6","1.2.10-6build1"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7ubuntu0.18.04.1~esm1"}]}],"versions":["1.2.10-7build2"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-7+deb9u2build0.20.04.1"}]}],"versions":["1.2.10-7build3","1.2.10-7build4"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libspf2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.10-6ubuntu0.1~esm2"}]}],"versions":["1.2.10-6","1.2.10-6build1","1.2.10-6ubuntu0.1~esm1"],"bundled":2}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"libspf2_project","product":"libspf2"}],"references":[{"url":"https://github.com/shevek/libspf2/tree/8131fe140704eaae695e76b5cd09e39bd1dd220b","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"https://nathanielbennett.com/blog/libspf2-cve-jan-2022-disclosure","tags":["x_transferred","Exploit","Third Party Advisory","evidence"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/01/msg00015.html","tags":["mailing-list","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://security.gentoo.org/glsa/202401-22","tags":["vendor-advisory","x_transferred","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-33912"},{"url":"https://github.com/advisories/GHSA-f8wp-q2v8-9hc2"},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-33912","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-33912","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-33912","tags":["report"]},{"url":"https://github.com/shevek/libspf2/commit/28faf4624a6a371b11afdb9820078d3b0ee3803d","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6584-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/notices/USN-6584-2","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-33912","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-20314","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-33913","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-33912","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.","status":"published","published":"2022-01-19T00:00:00Z","modified":"2024-08-04T00:05:52.118Z","updated_at":"2026-11-02T14:33:10.204494Z"}],"euvd":[{"id":"EUVD-2021-20584","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.","status":"published","published":"2022-01-19T00:00:00Z","modified":"2024-08-04T00:05:52Z","updated_at":"2026-11-03T03:24:33.318275Z"}],"ghsa":[{"id":"GHSA-f8wp-q2v8-9hc2","title":"libspf2 before 1.2.11 has a four-byte heap-based buffer overflow that might allow remote...","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.","status":"published","published":"2022-01-20T00:00:23Z","modified":"2024-01-15T18:30:18Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:55:25.085259Z"}],"nvd":[{"id":"CVE-2021-33912","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.","status":"published","published":"2022-01-19T18:15:07.783Z","modified":"2026-06-17T03:55:22.187Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":9.3,"vector":"AV:N/AC:M/Au:N/C:C/I:C/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:07:03.821385Z"}],"osv":[{"id":"ALPINE-CVE-2021-33912","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.","status":"published","published":"2022-01-19T18:15:07.783Z","modified":"2026-10-23T17:17:56.191314506Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:27:48.646074Z"},{"id":"CVE-2021-33912","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.","status":"published","published":"2022-01-19T18:15:07.783Z","modified":"2026-03-15T22:37:18.131346Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:20.13324Z"},{"id":"DEBIAN-CVE-2021-33912","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.","status":"published","published":"2022-01-19T18:15:07.783Z","modified":"2026-10-23T18:02:30.170294632Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:35.233346Z"},{"id":"UBUNTU-CVE-2021-33912","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.","status":"published","published":"2022-01-19T18:15:00Z","modified":"2026-04-22T12:55:03.285245Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:27.870979Z"},{"id":"DLA-2890-1","title":"libspf2 - security update","status":"published","published":"2022-01-21T00:00:00Z","modified":"2026-03-09T01:21:55.192003Z","updated_at":"2026-11-02T15:46:11.189256Z"},{"id":"USN-6584-1","title":"libspf2 vulnerabilities","description":"Philipp Jeitner and Haya Shulman discovered that Libspf2 incorrectly handled\ncertain inputs. If a user or an automated system were tricked into opening a\nspecially crafted input file, a remote attacker could possibly use this issue\nto cause a denial of service or execute arbitrary code. (CVE-2021-20314)\n\nIt was discovered that Libspf2 incorrectly handled certain inputs. If a user or\nan automated system were tricked into opening a specially crafted input file, a\nremote attacker could possibly use this issue to cause a denial of service or\nexecute arbitrary code. This issue only affected Ubuntu 18.04 LTS and \nUbuntu 20.04 LTS. (CVE-2021-33912, CVE-2021-33913)\n","status":"published","published":"2024-01-15T17:17:57Z","modified":"2026-06-25T13:31:51.737671436Z","updated_at":"2026-11-02T16:58:17.305935Z"},{"id":"USN-6584-2","title":"libspf2 vulnerabilities","description":"USN-6584-1 fixed several vulnerabilities in Ubuntu 18.04 LTS and\nUbuntu 20.04 LTS. This update provides the corresponding updates for\nCVE-2021-33912 and CVE-2021-33913 in Ubuntu 16.04 LTS.\n\nWe apologize for the inconvenience.\n\nOriginal advisory details:\n\n Philipp Jeitner and Haya Shulman discovered that Libspf2 incorrectly handled\n certain inputs. If a user or an automated system were tricked into opening a\n specially crafted input file, a remote attacker could possibly use this issue\n to cause a denial of service or execute arbitrary code. (CVE-2021-20314)\n \n It was discovered that Libspf2 incorrectly handled certain inputs. If a user or\n an automated system were tricked into opening a specially crafted input file, a\n remote attacker could possibly use this issue to cause a denial of service or\n execute arbitrary code. This issue only affected Ubuntu 18.04 LTS and \n Ubuntu 20.04 LTS. (CVE-2021-33912, CVE-2021-33913)\n","status":"published","published":"2024-02-21T10:40:23Z","modified":"2026-06-25T13:30:40.067058078Z","updated_at":"2026-11-02T16:58:17.305935Z"}]}}
