Every CVE Search/ Get API key

CVE-2022-1942

Heap-based Buffer Overflow in vim/vim

7.8 HighFix available

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

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

1.62%Up 0.7 points since Jun 1, 2022
90%50%10%1%

What each source reports

CVE List Score used 7.8

Heap-based Buffer Overflow in vim/vim

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Record
CVE-2022-1942
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-122
Updated
2026-11-02
EUVDEUVD-2022-25210 7.8

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Record
EUVD-2022-25210
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-fj94-39w8-g69w 7.8

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Record
GHSA-fj94-39w8-g69w
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-122, CWE-787
Updated
2026-11-02
NVD 7.8

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Record
CVE-2022-1942
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
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-122, CWE-787
Updated
2026-11-02
OSVBELL-CVE-2022-1942 7.8

CVE-2022-1942 does not affect BellSoft software

Record
BELL-CVE-2022-1942
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

Heap-based Buffer Overflow in vim/vim

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Record
CVE-2022-1942
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-122
Updated
2026-11-02
Show 7 moreShow less
OSVDEBIAN-CVE-2022-1942 7.8

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Record
DEBIAN-CVE-2022-1942
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
OSVOESA-2022-1717 9.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):

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2.(CVE-2022-1851)

Use After Free in GitHub repository vim/vim prior to 8.2.(CVE-2022-1898)

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.(CVE-2022-1942)

Out-of-bounds Write in GitHub repository vim/vim prior to 8.2.(CVE-2022-1897)

Use After Free in GitHub repository vim/vim prior to 8.2.(CVE-2022-1968)

Uncontrolled Recursion in GitHub repository vim/vim prior to 8.2.4975.(CVE-2022-1771)

Record
OESA-2022-1717
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2022-1942 7.8

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

Record
UBUNTU-CVE-2022-1942
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
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVMGASA-2022-0223 No score

Updated vim packages fix security vulnerability

out-of-bounds read in gchar_cursor() in misc1.c (CVE-2022-1851) use-after-free in find_pattern_in_path() in search.c (CVE-2022-1898) out-of-bounds write in vim_regsub_both() in regexp.c (CVE-2022-1897) buffer over-read in utf_ptr2char() in mbyte.c (CVE-2022-1927 ) out of bounds write in vim_regsub_both() (CVE-2022-1942) heap-based buffer overflow in function utf_head_off (CVE-2022-1886)

Record
MGASA-2022-0223
Updated
2026-11-02
OSVopenSUSE-SU-2024:12337-1 No score

gvim-9.0.0453-2.1 on GA media

These are all security issues fixed in the gvim-9.0.0453-2.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12337-1
Updated
2026-11-02
OSVUSN-5507-1 No score

vim vulnerabilities

It was discovered that Vim incorrectly handled memory access. An attacker could potentially use this issue to cause the program to crash, use unexpected values, or execute arbitrary code. (CVE-2022-1968)

It was discovered that Vim incorrectly handled memory access. An attacker could potentially use this issue to cause the corruption of sensitive information, a crash, or arbitrary code execution. (CVE-2022-1897, CVE-2022-1942)

Record
USN-5507-1
Updated
2026-11-02
OSVUSN-5995-1 No score

vim vulnerabilities

It was discovered that Vim incorrectly handled memory when opening certain files. If an attacker could trick a user into opening a specially crafted file, it could cause Vim to crash, or possible execute arbitrary code. This issue only affected Ubuntu 14.04 ESM, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-0413, CVE-2022-1629, CVE-2022-1674, CVE-2022-1733, CVE-2022-1735, CVE-2022-1785, CVE-2022-1796, CVE-2022-1851, CVE-2022-1898, CVE-2022-1942, CVE-2022-1968, CVE-2022-2124, CVE-2022-2125, CVE-2022-2126, CVE-2022-2129, CVE-2022-2175, CVE-2022-2183, CVE-2022-2206, CVE-2022-2304, CVE-2022-2345, CVE-2022-2581)

It was discovered that Vim incorrectly handled memory when opening certain files. If an attacker could trick a user into opening a specially crafted file, it could cause Vim to crash, or possible execute arbitrary code. This issue only affected Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-1720, CVE-2022-2571, CVE-2022-2845, CVE-2022-2849, CVE-2022-2923)

It was discovered that Vim incorrectly handled memory when opening certain files. If an attacker could trick a user into opening a specially crafted file, it could cause Vim to crash, or possible execute arbitrary code. This issue only affected Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2022-1927, CVE-2022-2344)

It was discovered that Vim incorrectly handled memory when opening certain files. If an attacker could trick a user into opening a specially crafted file, it could cause Vim to crash, or possible execute arbitrary code. This issue only affected Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, and Ubuntu 22.10. (CVE-2022-2946)

It was discovered that Vim incorrectly handled memory when opening certain files. If an attacker could trick a user into opening a specially crafted file, it could cause Vim to crash, or possible execute arbitrary code. This issue only affected Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, and Ubuntu 22.10. (CVE-2022-2980)

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

Affected products

Affected packages

Affected packages
PackageAffectedFixed
vim
Debian:12
before 2:9.0.0135-1
2:9.0.0135-1
vim
Debian:13
before 2:9.0.0135-1
2:9.0.0135-1
vim
Debian:14
before 2:9.0.0135-1
2:9.0.0135-1
vim
Debian:10
From an advisory covering 14 CVEs
before 2:8.1.0875-5+deb10u4, plus listed versions
2:8.1.0875-52:8.1.0875-5+deb10u12:8.1.0875-5+deb10u22:8.1.0875-5+deb10u3
2:8.1.0875-5+deb10u4
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 6 CVEs
before 8.2.5052-1.mga8
8.2.5052-1.mga8
vim
openEuler:20.03-LTS-SP1
From an advisory covering 6 CVEs
before 8.2-35.oe1
8.2-35.oe1
vim
openEuler:20.03-LTS-SP3
From an advisory covering 6 CVEs
before 8.2-34.oe1
8.2-34.oe1
vim
openEuler:22.03-LTS
From an advisory covering 6 CVEs
before 8.2-43.oe2203
8.2-43.oe2203
vim
Ubuntu:Pro:14.04:LTS
before 2:7.4.052-1ubuntu3.1+esm8, plus listed versions
2:7.4.000-1ubuntu22:7.4.052-1ubuntu12:7.4.052-1ubuntu22:7.4.052-1ubuntu32:7.4.052-1ubuntu3.1
Show 6 moreShow less
2:7.4.052-1ubuntu3.1+esm12:7.4.052-1ubuntu3.1+esm32:7.4.052-1ubuntu3.1+esm42:7.4.052-1ubuntu3.1+esm52:7.4.052-1ubuntu3.1+esm62:7.4.052-1ubuntu3.1+esm7
2:7.4.052-1ubuntu3.1+esm8
Show 10 moreShow less
Affected packages
PackageAffectedFixed
vim
Ubuntu:Pro:16.04:LTS
before 2:7.4.1689-3ubuntu1.5+esm10, 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 15 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.52:7.4.1689-3ubuntu1.5+esm22:7.4.1689-3ubuntu1.5+esm32:7.4.1689-3ubuntu1.5+esm42:7.4.1689-3ubuntu1.5+esm52:7.4.1689-3ubuntu1.5+esm62:7.4.1689-3ubuntu1.5+esm72:7.4.1689-3ubuntu1.5+esm8
2:7.4.1689-3ubuntu1.5+esm10
vim
Ubuntu:18.04:LTS
before 2:8.0.1453-1ubuntu1.12, 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 10 moreShow less
2:8.0.1453-1ubuntu12:8.0.1453-1ubuntu1.12:8.0.1453-1ubuntu1.32:8.0.1453-1ubuntu1.42:8.0.1453-1ubuntu1.62:8.0.1453-1ubuntu1.72:8.0.1453-1ubuntu1.82:8.0.1453-1ubuntu1.92:8.0.1453-1ubuntu1.102:8.0.1453-1ubuntu1.11
2:8.0.1453-1ubuntu1.12
vim
Ubuntu:20.04:LTS
before 2:8.1.2269-1ubuntu5.13, plus listed versions
2:8.1.0875-5ubuntu22:8.1.0875-5ubuntu32:8.1.0875-5ubuntu42:8.1.2269-1ubuntu12:8.1.2269-1ubuntu4
Show 9 moreShow less
2:8.1.2269-1ubuntu52:8.1.2269-1ubuntu5.32:8.1.2269-1ubuntu5.42:8.1.2269-1ubuntu5.62:8.1.2269-1ubuntu5.72:8.1.2269-1ubuntu5.82:8.1.2269-1ubuntu5.92:8.1.2269-1ubuntu5.112:8.1.2269-1ubuntu5.12
2:8.1.2269-1ubuntu5.13
vim
Ubuntu:22.04:LTS
before 2:8.2.3995-1ubuntu2.5, plus listed versions
2:8.2.2434-3ubuntu32:8.2.2434-3ubuntu42:8.2.3565-1ubuntu12:8.2.3565-1ubuntu22:8.2.3565-1ubuntu3
Show 6 moreShow less
2:8.2.3565-1ubuntu52:8.2.3995-1ubuntu12:8.2.3995-1ubuntu22:8.2.3995-1ubuntu2.12:8.2.3995-1ubuntu2.32:8.2.3995-1ubuntu2.4
2:8.2.3995-1ubuntu2.5
vim
Ubuntu:Pro:16.04:LTS
From an advisory covering 3 CVEs
before 2:7.4.1689-3ubuntu1.5+esm10, 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 15 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.52:7.4.1689-3ubuntu1.5+esm22:7.4.1689-3ubuntu1.5+esm32:7.4.1689-3ubuntu1.5+esm42:7.4.1689-3ubuntu1.5+esm52:7.4.1689-3ubuntu1.5+esm62:7.4.1689-3ubuntu1.5+esm72:7.4.1689-3ubuntu1.5+esm8
2:7.4.1689-3ubuntu1.5+esm10
vim
Ubuntu:Pro:14.04:LTS
From an advisory covering 30 CVEs
before 2:7.4.052-1ubuntu3.1+esm8, plus listed versions
2:7.4.000-1ubuntu22:7.4.052-1ubuntu12:7.4.052-1ubuntu22:7.4.052-1ubuntu32:7.4.052-1ubuntu3.1
Show 6 moreShow less
2:7.4.052-1ubuntu3.1+esm12:7.4.052-1ubuntu3.1+esm32:7.4.052-1ubuntu3.1+esm42:7.4.052-1ubuntu3.1+esm52:7.4.052-1ubuntu3.1+esm62:7.4.052-1ubuntu3.1+esm7
2:7.4.052-1ubuntu3.1+esm8
vim
Ubuntu:18.04:LTS
From an advisory covering 30 CVEs
before 2:8.0.1453-1ubuntu1.12, 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 10 moreShow less
2:8.0.1453-1ubuntu12:8.0.1453-1ubuntu1.12:8.0.1453-1ubuntu1.32:8.0.1453-1ubuntu1.42:8.0.1453-1ubuntu1.62:8.0.1453-1ubuntu1.72:8.0.1453-1ubuntu1.82:8.0.1453-1ubuntu1.92:8.0.1453-1ubuntu1.102:8.0.1453-1ubuntu1.11
2:8.0.1453-1ubuntu1.12
vim
Ubuntu:20.04:LTS
From an advisory covering 30 CVEs
before 2:8.1.2269-1ubuntu5.13, plus listed versions
2:8.1.0875-5ubuntu22:8.1.0875-5ubuntu32:8.1.0875-5ubuntu42:8.1.2269-1ubuntu12:8.1.2269-1ubuntu4
Show 9 moreShow less
2:8.1.2269-1ubuntu52:8.1.2269-1ubuntu5.32:8.1.2269-1ubuntu5.42:8.1.2269-1ubuntu5.62:8.1.2269-1ubuntu5.72:8.1.2269-1ubuntu5.82:8.1.2269-1ubuntu5.92:8.1.2269-1ubuntu5.112:8.1.2269-1ubuntu5.12
2:8.1.2269-1ubuntu5.13
vim
Ubuntu:22.04:LTS
From an advisory covering 30 CVEs
before 2:8.2.3995-1ubuntu2.5, plus listed versions
2:8.2.2434-3ubuntu32:8.2.2434-3ubuntu42:8.2.3565-1ubuntu12:8.2.3565-1ubuntu22:8.2.3565-1ubuntu3
Show 6 moreShow less
2:8.2.3565-1ubuntu52:8.2.3995-1ubuntu12:8.2.3995-1ubuntu22:8.2.3995-1ubuntu2.12:8.2.3995-1ubuntu2.32:8.2.3995-1ubuntu2.4
2:8.2.3995-1ubuntu2.5
vim
openSUSE:Tumbleweed
From an advisory covering 84 CVEs
before 9.0.0453-2.1
9.0.0453-2.1

History

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

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

In short

CVE-2022-1942 is a high vulnerability (CVSS 7.8) in Vim, published May 31, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.62%, the 76th percentile. Fixed in vim 2:9.0.0135-1.

References

Show 138 moreShow less
MoveEnter Open