Every CVE Search/ Get API key

CVE-2021-3770

Heap-based Buffer Overflow in vim/vim

8.6 HighFix available

vim is vulnerable to Heap-based Buffer Overflow

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.73%Up 0.1 points since Sep 6, 2021
90%50%10%1%

What each source reports

CVE List Score used 8.6

Heap-based Buffer Overflow in vim/vim

vim is vulnerable to Heap-based Buffer Overflow

Record
CVE-2021-3770
CVSS 3.0
8.6 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Weakness
CWE-122
Updated
2026-11-02
EUVDEUVD-2021-27039 8.6

vim is vulnerable to Heap-based Buffer Overflow

Record
EUVD-2021-27039
CVSS 3.0
8.6 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-qjvf-2fhp-q8rx 7.8

vim is vulnerable to Heap-based Buffer Overflow

vim is vulnerable to Heap-based Buffer Overflow

Record
GHSA-qjvf-2fhp-q8rx
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-122, CWE-787
Updated
2026-11-02
NVD 7.8

vim is vulnerable to Heap-based Buffer Overflow

Record
CVE-2021-3770
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 3.0
8.6 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
CVSS 2.0
4.6 MediumAV:L/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-122, CWE-787
Updated
2026-11-02
OSVALPINE-CVE-2021-3770 7.8

vim is vulnerable to Heap-based Buffer Overflow

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

CVE-2021-3770 does not affect BellSoft software

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

vim is vulnerable to Heap-based Buffer Overflow

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

vim is vulnerable to Heap-based Buffer Overflow

Record
DEBIAN-CVE-2021-3770
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVOESA-2021-1344 7.8

vim security update

Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor 'Vi', with a more complete feature set. Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.

Security Fix(es):

vim is vulnerable to Heap-based Buffer Overflow(CVE-2021-3770)

Record
OESA-2021-1344
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-3770 7.8

vim is vulnerable to Heap-based Buffer Overflow

Record
UBUNTU-CVE-2021-3770
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 3.0
8.6 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVMGASA-2021-0432 No score

Updated vim packages fix security vulnerability

Using retab with large value may lead to heap buffer overflow

Record
MGASA-2021-0432
Updated
2026-11-02
OSVUSN-5093-1 No score

vim vulnerabilities

Brian Carpenter discovered that vim incorrectly handled memory when opening certain files. If a user was tricked into opening a specially crafted file, a remote attacker could crash the application, leading to a denial of service, or possibly execute arbitrary code with user privileges. This issue only affected Ubuntu 20.04 LTS and Ubuntu 21.04. (CVE-2021-3770)

Brian Carpenter discovered that vim incorrectly handled memory when opening certain files. If a user was tricked into opening a specially crafted file, a remote attacker could crash the application, leading to a denial of service, or possibly execute arbitrary code with user privileges. (CVE-2021-3778)

Dhiraj Mishra discovered that vim incorrectly handled memory when opening certain files. If a user was tricked into opening a specially crafted file, a remote attacker could crash the application, leading to a denial of service, or possibly execute arbitrary code with user privileges. (CVE-2021-3796)

Record
USN-5093-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
vim
Alpine:v3.11
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.12
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.13
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.14
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.15
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.16
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.17
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.18
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.19
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.20
before 8.2.3437-r0
8.2.3437-r0
Show 15 moreShow less
Affected packages
PackageAffectedFixed
vim
Alpine:v3.21
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.22
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.23
before 8.2.3437-r0
8.2.3437-r0
vim
Alpine:v3.24
before 8.2.3437-r0
8.2.3437-r0
vim
Debian:12
before 2:8.2.3455-1
2:8.2.3455-1
vim
Debian:13
before 2:8.2.3455-1
2:8.2.3455-1
vim
Debian:14
before 2:8.2.3455-1
2:8.2.3455-1
vim
Mageia:8
before 8.2.2143-3.1.mga8
8.2.2143-3.1.mga8
vim
openEuler:20.03-LTS-SP1
before 8.2-2.oe1
8.2-2.oe1
vim
openEuler:20.03-LTS-SP2
before 8.2-2.oe1
8.2-2.oe1
vim
Ubuntu:20.04:LTS
before 2:8.1.2269-1ubuntu5.3, plus listed versions
2:8.1.0875-5ubuntu22:8.1.0875-5ubuntu32:8.1.0875-5ubuntu42:8.1.2269-1ubuntu12:8.1.2269-1ubuntu42:8.1.2269-1ubuntu5
2:8.1.2269-1ubuntu5.3
vim
Ubuntu:Pro:14.04:LTS
From an advisory covering 3 CVEs
before 2:7.4.052-1ubuntu3.1+esm3, plus listed versions
2:7.4.000-1ubuntu22:7.4.052-1ubuntu12:7.4.052-1ubuntu22:7.4.052-1ubuntu32:7.4.052-1ubuntu3.12:7.4.052-1ubuntu3.1+esm1
2:7.4.052-1ubuntu3.1+esm3
vim
Ubuntu:Pro:16.04:LTS
From an advisory covering 3 CVEs
before 2:7.4.1689-3ubuntu1.5+esm2, plus listed versions
2:7.4.712-2ubuntu42:7.4.826-1ubuntu12:7.4.826-1ubuntu22:7.4.826-1ubuntu32:7.4.963-1ubuntu1
Show 8 moreShow less
2:7.4.963-1ubuntu42:7.4.963-1ubuntu52:7.4.1689-3ubuntu12:7.4.1689-3ubuntu1.12:7.4.1689-3ubuntu1.22:7.4.1689-3ubuntu1.32:7.4.1689-3ubuntu1.42:7.4.1689-3ubuntu1.5
2:7.4.1689-3ubuntu1.5+esm2
vim
Ubuntu:18.04:LTS
From an advisory covering 3 CVEs
before 2:8.0.1453-1ubuntu1.6, plus listed versions
2:8.0.0197-4ubuntu52:8.0.1144-1ubuntu12:8.0.1401-1ubuntu12:8.0.1401-1ubuntu22:8.0.1401-1ubuntu3
Show 4 moreShow less
2:8.0.1453-1ubuntu12:8.0.1453-1ubuntu1.12:8.0.1453-1ubuntu1.32:8.0.1453-1ubuntu1.4
2:8.0.1453-1ubuntu1.6
vim
Ubuntu:20.04:LTS
From an advisory covering 3 CVEs
before 2:8.1.2269-1ubuntu5.3, plus listed versions
2:8.1.0875-5ubuntu22:8.1.0875-5ubuntu32:8.1.0875-5ubuntu42:8.1.2269-1ubuntu12:8.1.2269-1ubuntu42:8.1.2269-1ubuntu5
2:8.1.2269-1ubuntu5.3

History

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

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

In short

CVE-2021-3770 is a high vulnerability (CVSS 8.6) in Vim, published September 6, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.73%, the 54th percentile. Fixed in vim 8.2.3437-r0.

References

Show 21 moreShow less
MoveEnter Open