Every CVE Search/ Get API key

CVE-2021-4173

Use After Free in vim/vim

6.8 MediumFix available

vim is vulnerable to Use After Free

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
High
Availability
High

Exploit likelihood

1.76%Up 1.1 points since Dec 28, 2021
90%50%10%1%

What each source reports

CVE List Score used 6.8

Use After Free in vim/vim

vim is vulnerable to Use After Free

Record
CVE-2021-4173
CVSS 3.0
6.8 MediumCVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H
Weakness
CWE-416
Updated
2026-11-02
EUVDEUVD-2021-34035 6.8

vim is vulnerable to Use After Free

Record
EUVD-2021-34035
CVSS 3.0
6.8 MediumCVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-h3r6-368v-w6xc 7.8

vim is vulnerable to Use After Free

vim is vulnerable to Use After Free

Record
GHSA-h3r6-368v-w6xc
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-416
Updated
2026-11-02
NVD 7.8

vim is vulnerable to Use After Free

Record
CVE-2021-4173
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 3.0
6.8 MediumCVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-416
Updated
2026-11-03
OSVALPINE-CVE-2021-4173 7.8

vim is vulnerable to Use After Free

Record
ALPINE-CVE-2021-4173
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSVAZL-7084 7.8

CVE-2021-4173 affecting package vim for versions less than 8.2.4081-1

vim is vulnerable to Use After Free

Record
AZL-7084
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 7 moreShow less
OSVBELL-CVE-2021-4173 7.8

CVE-2021-4173 does not affect BellSoft software

Record
BELL-CVE-2021-4173
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSV 7.8

vim is vulnerable to Use After Free

Record
CVE-2021-4173
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-04
OSVDEBIAN-CVE-2021-4173 7.8

vim is vulnerable to Use After Free

Record
DEBIAN-CVE-2021-4173
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSVUBUNTU-CVE-2021-4173 7.8

vim is vulnerable to Use After Free

Record
UBUNTU-CVE-2021-4173
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 3.0
6.8 MediumCVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:H
Updated
2026-11-02
OSVCLSA-2026-1777313322 No score

vim: Fix of 3 CVEs

  • CVE-2021-4173: fix double free in Vim9 nested :def function definition
  • CVE-2022-3352: fix use-after-free when SpellFileMissing autocmd deletes the current buffer during spell file loading
  • CVE-2022-2343: fix heap buffer overflow in ins_compl_add_infercase() when completing a long line with 'infercase' set
Record
CLSA-2026-1777313322
Updated
2026-11-02
OSVCLSA-2026-1777323039 No score

vim: Fix of 3 CVEs

  • CVE-2021-4173: fix double free in Vim9 nested :def function definition
  • CVE-2022-3352: fix use-after-free when SpellFileMissing autocmd deletes the current buffer during spell file loading
  • CVE-2022-2343: fix heap buffer overflow in ins_compl_add_infercase() when completing a long line with 'infercase' set
Record
CLSA-2026-1777323039
Updated
2026-11-02
OSVMGASA-2022-0015 No score

Updated vim packages fix security vulnerability

CWE-122 Heap-based Buffer Overflow (CVE-2021-4136) CWE-125 Out-of-bounds Read (CVE-2021-4166) CWE-416 Use After Free (CVE-2021-4173) CWE-416 Use After Free (CVE-2021-4187)

Record
MGASA-2022-0015
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
vim
Alpine:v3.12
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.13
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.14
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.15
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.16
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.17
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.18
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.19
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.20
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.21
before 8.2.4173-r0
8.2.4173-r0
Show 19 moreShow less
Affected packages
PackageAffectedFixed
vim
Alpine:v3.22
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.23
before 8.2.4173-r0
8.2.4173-r0
vim
Alpine:v3.24
before 8.2.4173-r0
8.2.4173-r0
vim
Azure Linux:2
before 8.2.4081-1
8.2.4081-1
vim-X11
TuxCare:AlmaLinux:9.6
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_6.1.tuxcare.els11
2:8.2.2637-22.el9_6.1.tuxcare.els11
vim-common
TuxCare:AlmaLinux:9.6
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_6.1.tuxcare.els11
2:8.2.2637-22.el9_6.1.tuxcare.els11
vim-enhanced
TuxCare:AlmaLinux:9.6
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_6.1.tuxcare.els11
2:8.2.2637-22.el9_6.1.tuxcare.els11
vim-filesystem
TuxCare:AlmaLinux:9.6
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_6.1.tuxcare.els11
2:8.2.2637-22.el9_6.1.tuxcare.els11
vim-minimal
TuxCare:AlmaLinux:9.6
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_6.1.tuxcare.els11
2:8.2.2637-22.el9_6.1.tuxcare.els11
vim-X11
TuxCare:AlmaLinux:9.2
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_1.1.tuxcare.els11
2:8.2.2637-22.el9_1.1.tuxcare.els11
vim-common
TuxCare:AlmaLinux:9.2
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_1.1.tuxcare.els11
2:8.2.2637-22.el9_1.1.tuxcare.els11
vim-enhanced
TuxCare:AlmaLinux:9.2
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_1.1.tuxcare.els11
2:8.2.2637-22.el9_1.1.tuxcare.els11
vim-filesystem
TuxCare:AlmaLinux:9.2
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_1.1.tuxcare.els11
2:8.2.2637-22.el9_1.1.tuxcare.els11
vim-minimal
TuxCare:AlmaLinux:9.2
From an advisory covering 3 CVEs
before 2:8.2.2637-22.el9_1.1.tuxcare.els11
2:8.2.2637-22.el9_1.1.tuxcare.els11
vim
Debian:12
before 2:8.2.3995-1
2:8.2.3995-1
vim
Debian:13
before 2:8.2.3995-1
2:8.2.3995-1
vim
Debian:14
before 2:8.2.3995-1
2:8.2.3995-1
vim
Debian:11
From an advisory covering 32 CVEs
before 2:8.2.2434-3+deb11u2, plus listed versions
2:8.2.2434-32:8.2.2434-3+deb11u1
2:8.2.2434-3+deb11u2
vim
Mageia:8
From an advisory covering 4 CVEs
before 8.2.4006-1.mga8
8.2.4006-1.mga8

History

History
RecordedChangedSources
affectedOSV
factsOSV
affectedOSV
affected
aliasesEUVD, NVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-4173 is a medium vulnerability (CVSS 6.8) in Vim, published December 27, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.76%, the 78th percentile. Fixed in vim 8.2.4173-r0.

References

Show 21 moreShow less
MoveEnter Open