Every CVE Search/ Get API key

CVE-2021-4187

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 30, 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-4187
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-34047 6.8

vim is vulnerable to Use After Free

Record
EUVD-2021-34047
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-wh99-p8pv-5qjw 7.8

vim is vulnerable to Use After Free

vim is vulnerable to Use After Free

Record
GHSA-wh99-p8pv-5qjw
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-4187
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-4187 7.8

vim is vulnerable to Use After Free

Record
ALPINE-CVE-2021-4187
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-7111 7.8

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

vim is vulnerable to Use After Free

Record
AZL-7111
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 5 moreShow less
OSVBELL-CVE-2021-4187 7.8

CVE-2021-4187 does not affect BellSoft software

Record
BELL-CVE-2021-4187
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-4187
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-4187 7.8

vim is vulnerable to Use After Free

Record
DEBIAN-CVE-2021-4187
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-4187 7.8

vim is vulnerable to Use After Free

Record
UBUNTU-CVE-2021-4187
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
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 9 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
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-4187 is a medium vulnerability (CVSS 6.8) in Vim, published December 29, 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 19 moreShow less
MoveEnter Open