CVE-2021-3770
Heap-based Buffer Overflow in vim/vim
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
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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 8.6 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H - CVSS 2.0
- 4.6 Medium
AV: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 8.6 High
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
vimAlpine:v3.11 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.12 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.13 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.14 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.15 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.16 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.17 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.18 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.19 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.20 |
before 8.2.3437-r0 | 8.2.3437-r0 |
Show 15 moreShow less
| Package | Affected | Fixed |
|---|---|---|
vimAlpine:v3.21 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.22 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.23 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimAlpine:v3.24 |
before 8.2.3437-r0 | 8.2.3437-r0 |
vimDebian:12 |
before 2:8.2.3455-1 | 2:8.2.3455-1 |
vimDebian:13 |
before 2:8.2.3455-1 | 2:8.2.3455-1 |
vimDebian:14 |
before 2:8.2.3455-1 | 2:8.2.3455-1 |
vimMageia:8 |
before 8.2.2143-3.1.mga8 | 8.2.2143-3.1.mga8 |
vimopenEuler:20.03-LTS-SP1 |
before 8.2-2.oe1 | 8.2-2.oe1 |
vimopenEuler:20.03-LTS-SP2 |
before 8.2-2.oe1 | 8.2-2.oe1 |
vimUbuntu: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 |
vimUbuntu: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 |
vimUbuntu: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 less2: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 |
vimUbuntu: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 less2: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 |
vimUbuntu: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
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected | OSV | |
| aliases | EUVD | |
| first indexed | CVE 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
huntr.dev/bounties/016ad2f2-07c1-4d14-a8ce-6eed10729365
github.com/vim/vim/commit/b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/J2CJLY3CF55I2ULG2X4ENXLSXAXYW5J4
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/X4FFQARG3LGREPDZRI4C7ERQL3RJKEWQ
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZFNTMVZCN4TRTTCAXRLVQ7H2P7FYAIZQ
openwall.com/lists/oss-security/2021/10/01/1
Show 21 moreShow less
security.gentoo.org/glsa/202208-32
security.netapp.com/advisory/ntap-20221124-0003
nvd.nist.gov/vuln/detail/CVE-2021-3770
lists.fedoraproject.org/archives/list/[email protected]/message/J2CJLY3CF55I2ULG2X4ENXLSXAXYW5J4
lists.fedoraproject.org/archives/list/[email protected]/message/X4FFQARG3LGREPDZRI4C7ERQL3RJKEWQ
lists.fedoraproject.org/archives/list/[email protected]/message/ZFNTMVZCN4TRTTCAXRLVQ7H2P7FYAIZQ
github.com/advisories/GHSA-qjvf-2fhp-q8rx
security.alpinelinux.org/vuln/CVE-2021-3770
docs.bell-sw.com/security/cves/CVE-2021-3770
security-tracker.debian.org/tracker/CVE-2021-3770
advisories.mageia.org/MGASA-2021-0432.html
bugs.mageia.org/show_bug.cgi?id=29444
bugzilla.redhat.com/show_bug.cgi?id=2001929
lists.fedoraproject.org/archives/list/[email protected]/thread/J2CJLY3CF55I2ULG2X4ENXLSXAXYW5J4
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2021-1344
ubuntu.com/security/CVE-2021-3770
github.com/vim/vim/commit/2ddb89f8a94425cda1e5491efc80c1ccccb6e08e
ubuntu.com/security/notices/USN-5093-1
cve.org/CVERecord?id=CVE-2021-3770
ubuntu.com/security/CVE-2021-3778
ubuntu.com/security/CVE-2021-3796