{"id":"CVE-2021-4173","aliases":["ALPINE-CVE-2021-4173","AZL-7084","BELL-CVE-2021-4173","CLSA-2026-1777313322","CLSA-2026-1777323039","DEBIAN-CVE-2021-4173","DLA-4097-1","EUVD-2021-34035","GHSA-h3r6-368v-w6xc","MGASA-2022-0015","UBUNTU-CVE-2021-4173"],"status":"published","title":"Use After Free in vim/vim","description":"vim is vulnerable to Use After Free","severity":{"version":"3.0","score":6.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01758,"percentile":0.78132,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2021-12-27T12:25:12Z","modified":"2026-11-04T07:08:16Z","fixes":[{"ecosystem":"Alpine:v3.12","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.13","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.14","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.15","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.16","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.17","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"vim","fixed_in":["8.2.4173-r0"],"sources":["osv"]},{"ecosystem":"Azure Linux:2","package":"vim","fixed_in":["8.2.4081-1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"vim","fixed_in":["2:8.2.3995-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"vim","fixed_in":["2:8.2.3995-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"vim","fixed_in":["2:8.2.3995-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Alpine:v3.12","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.13","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.14","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.15","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.16","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4173-r0"}]}]},{"source":"osv","ecosystem":"Azure Linux:2","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4081-1"}]}]},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.6","package":"vim-X11","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_6.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.6","package":"vim-common","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_6.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.6","package":"vim-enhanced","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_6.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.6","package":"vim-filesystem","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_6.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.6","package":"vim-minimal","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_6.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.2","package":"vim-X11","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_1.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.2","package":"vim-common","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_1.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.2","package":"vim-enhanced","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_1.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.2","package":"vim-filesystem","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_1.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.2","package":"vim-minimal","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2637-22.el9_1.1.tuxcare.els11"}]}],"bundled":3},{"source":"osv","ecosystem":"Debian:12","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.3995-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.3995-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.3995-1"}]}]},{"source":"osv","ecosystem":"Debian:11","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:8.2.2434-3+deb11u2"}]}],"versions":["2:8.2.2434-3","2:8.2.2434-3+deb11u1"],"bundled":32},{"source":"osv","ecosystem":"Mageia:8","package":"vim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.4006-1.mga8"}]}],"bundled":4}],"products":[{"vendor":"apple","product":"mac_os_x"},{"vendor":"apple","product":"macos"},{"vendor":"fedoraproject","product":"fedora"},{"vendor":"vim","product":"vim"},{"vendor":"vim","product":"vim/vim"}],"references":[{"url":"https://huntr.dev/bounties/a1b236b9-89fb-4ccf-9689-ba11b471e766","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","evidence","report"]},{"url":"https://github.com/vim/vim/commit/9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2EY2VFBU3YGGWI5BW4XKT3F37MYGEQUD/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"http://www.openwall.com/lists/oss-security/2022/01/15/1","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3FH2J57GDA2WMBS6J56F6QQRA6BXQQFZ/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://support.apple.com/kb/HT213183","tags":["x_refsource_CONFIRM","x_transferred","Release Notes","Third Party Advisory","advisory"]},{"url":"http://seclists.org/fulldisclosure/2022/Mar/29","tags":["mailing-list","x_refsource_FULLDISC","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://support.apple.com/kb/HT213256","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"http://seclists.org/fulldisclosure/2022/May/35","tags":["mailing-list","x_refsource_FULLDISC","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://support.apple.com/kb/HT213343","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"http://seclists.org/fulldisclosure/2022/Jul/14","tags":["mailing-list","x_refsource_FULLDISC","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://security.gentoo.org/glsa/202208-32","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4173","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2EY2VFBU3YGGWI5BW4XKT3F37MYGEQUD"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3FH2J57GDA2WMBS6J56F6QQRA6BXQQFZ"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2EY2VFBU3YGGWI5BW4XKT3F37MYGEQUD"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3FH2J57GDA2WMBS6J56F6QQRA6BXQQFZ"},{"url":"https://github.com/advisories/GHSA-h3r6-368v-w6xc"},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-4173","tags":["advisory"]},{"url":"https://docs.bell-sw.com/security/cves/CVE-2021-4173","tags":["advisory"]},{"url":"https://errata.tuxcare.com/els_os/tuxcare9.6esu/CLSA-2026-1777313322.html","tags":["advisory"]},{"url":"https://errata.tuxcare.com/els_os/almalinux9.2esu/CLSA-2026-1777323039.html","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-4173","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2022-0015.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=29856","tags":["report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/2EY2VFBU3YGGWI5BW4XKT3F37MYGEQUD/","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-4173","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-4173","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-4173","title":"Use After Free in vim/vim","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-27T12:25:12Z","modified":"2026-11-02T18:09:28.884Z","cvss":[{"version":"3.0","score":6.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T19:47:06.831391Z"}],"euvd":[{"id":"EUVD-2021-34035","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-27T12:25:12Z","modified":"2026-11-02T18:09:28Z","cvss":[{"version":"3.0","score":6.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H","level":"medium"}],"updated_at":"2026-11-03T05:08:39.228431Z"}],"ghsa":[{"id":"GHSA-h3r6-368v-w6xc","title":"vim is vulnerable to Use After Free","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-28T00:00:33Z","modified":"2025-11-03T21:31:41Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:04:19.274788Z"}],"nvd":[{"id":"CVE-2021-4173","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-27T13:15:07.653Z","modified":"2026-11-02T19:17:46.227Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"3.0","score":6.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H","level":"medium","assessor":"secondary"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-416"],"updated_at":"2026-11-03T00:01:40.46005Z"}],"osv":[{"id":"ALPINE-CVE-2021-4173","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-27T13:15:07.653Z","modified":"2026-11-03T06:31:46.89382757Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T07:18:15.355745Z"},{"id":"AZL-7084","title":"CVE-2021-4173 affecting package vim for versions less than 8.2.4081-1","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-27T13:15:07Z","modified":"2026-04-21T04:36:28.57008Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:28:08.907584Z"},{"id":"BELL-CVE-2021-4173","title":"CVE-2021-4173 does not affect BellSoft software","status":"withdrawn","published":"2023-08-31T12:14:48.96949Z","modified":"2026-01-26T10:04:54.373844Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:28:16.5265Z"},{"id":"CVE-2021-4173","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-27T13:15:07.653Z","modified":"2026-11-04T07:08:16.432338406Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-04T07:32:23.735279Z"},{"id":"DEBIAN-CVE-2021-4173","description":"vim is vulnerable to Use After Free","status":"published","published":"2021-12-27T13:15:07.653Z","modified":"2026-11-03T09:47:33.263028801Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T10:27:58.933618Z"},{"id":"UBUNTU-CVE-2021-4173","description":"vim is vulnerable to Use After Free","status":"withdrawn","published":"2021-12-27T13:15:00Z","modified":"2025-07-16T07:43:19.52071Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"},{"version":"3.0","score":6.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"CLSA-2026-1777313322","title":"vim: Fix of 3 CVEs","description":"- CVE-2021-4173: fix double free in Vim9 nested :def function definition\n- CVE-2022-3352: fix use-after-free when SpellFileMissing autocmd deletes\n  the current buffer during spell file loading\n- CVE-2022-2343: fix heap buffer overflow in ins_compl_add_infercase() when\n  completing a long line with 'infercase' set","status":"published","published":"2026-04-27T18:08:47Z","modified":"2026-10-21T10:46:53.124862138Z","updated_at":"2026-11-02T15:43:44.384419Z"},{"id":"CLSA-2026-1777323039","title":"vim: Fix of 3 CVEs","description":"- CVE-2021-4173: fix double free in Vim9 nested :def function definition\n- CVE-2022-3352: fix use-after-free when SpellFileMissing autocmd deletes\n  the current buffer during spell file loading\n- CVE-2022-2343: fix heap buffer overflow in ins_compl_add_infercase() when\n  completing a long line with 'infercase' set","status":"published","published":"2026-04-27T20:50:44Z","modified":"2026-10-21T10:46:41.920608526Z","updated_at":"2026-11-02T15:43:44.384419Z"},{"id":"DLA-4097-1","title":"vim - security update","status":"published","published":"2025-03-30T00:00:00Z","modified":"2026-03-09T01:23:09.546419Z","updated_at":"2026-11-02T15:46:12.7027Z"},{"id":"MGASA-2022-0015","title":"Updated vim packages fix security vulnerability","description":"CWE-122 Heap-based Buffer Overflow (CVE-2021-4136)\nCWE-125 Out-of-bounds Read (CVE-2021-4166)\nCWE-416 Use After Free (CVE-2021-4173)\nCWE-416 Use After Free (CVE-2021-4187)\n","status":"published","published":"2022-01-15T08:09:56Z","modified":"2026-04-16T04:41:06.538110088Z","updated_at":"2026-11-02T15:49:41.849028Z"}]}}
