Every CVE Search/ Get API key

CVE-2022-3491

Heap-based Buffer Overflow in vim/vim

4.0 MediumFix available

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

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
Low

Exploit likelihood

0.52%Down 0.4 points since Dec 4, 2022
90%50%10%1%

What each source reports

CVE List Score used 4.0

Heap-based Buffer Overflow in vim/vim

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

Record
CVE-2022-3491
CVSS 3.0
4.0 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-122
Updated
2026-11-02
EUVDEUVD-2022-42863 4.0

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

Record
EUVD-2022-42863
CVSS 3.0
4.0 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-7g7x-hhf5-323c 9.8

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

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

Record
GHSA-7g7x-hhf5-323c
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/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 9.0.0742.

Record
CVE-2022-3491
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
4.0 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-122, CWE-787
Updated
2026-11-02
OSV 4.0

Heap-based Buffer Overflow in vim/vim

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

Record
CVE-2022-3491
CVSS 3.0
4.0 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-122
Updated
2026-11-02
OSVOESA-2022-2135 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):

Heap based buffer overflow in vim/vim 9.0.0946 and below by allowing an attacker to CTRL-W gf in the expression used in the RHS of the substitute command.(CVE-2022-4141)

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

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

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

Record
OESA-2022-2135
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
Show 5 moreShow less
OSVUBUNTU-CVE-2022-3491 7.8

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

Record
UBUNTU-CVE-2022-3491
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
4.0 MediumCVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02
OSVDEBIAN-CVE-2022-3491 No score

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

Record
DEBIAN-CVE-2022-3491
Updated
2026-11-03
OSVSUSE-SU-2022:4631-1 No score

Security update for vim

This update for vim fixes the following issues:

Updated to version 9.0.1040:

  • CVE-2022-3491: vim: Heap-based Buffer Overflow prior to 9.0.0742 (bsc#1206028).
  • CVE-2022-3520: vim: Heap-based Buffer Overflow (bsc#1206071).
  • CVE-2022-3591: vim: Use After Free (bsc#1206072).
  • CVE-2022-4292: vim: Use After Free in GitHub repository vim/vim prior to 9.0.0882 (bsc#1206075).
  • CVE-2022-4293: vim: Floating Point Comparison with Incorrect Operator in GitHub repository vim/vim prior to 9.0.0804 (bsc#1206077).
  • CVE-2022-4141: vim: heap-buffer-overflow in alloc.c 246:11 (bsc#1205797).
  • CVE-2022-3705: vim: use after free in function qf_update_buffer of the file quickfix.c (bsc#1204779).
Record
SUSE-SU-2022:4631-1
Updated
2026-11-02
OSVSUSE-SU-2023:0209-1 No score

Security update for vim

This update for vim fixes the following issues:

  • Updated to version 9.0.1234:
    • CVE-2023-0433: Fixed an out of bounds memory access that could cause a crash (bsc#1207396).
    • CVE-2023-0288: Fixed an out of bounds memory access that could cause a crash (bsc#1207162).
    • CVE-2023-0054: Fixed an out of bounds memory write that could cause a crash or memory corruption (bsc#1206868).
    • CVE-2023-0051: Fixed an out of bounds memory access that could cause a crash (bsc#1206867).
    • CVE-2023-0049: Fixed an out of bounds memory access that could cause a crash (bsc#1206866).
    • CVE-2022-3491: Fixed an out of bounds memory access that could cause a crash (bsc#1206028).
    • CVE-2022-3520: Fixed an out of bounds memory access that could cause a crash (bsc#1206071).
    • CVE-2022-3591: Fixed a use-after-free issue that could cause memory corruption or undefined behavior (bsc#1206072).
    • CVE-2022-4292: Fixed a use-after-free issue that could cause memory corruption or undefined behavior (bsc#1206075).
    • CVE-2022-4293: Fixed a floating point exception that could cause a crash (bsc#1206077).
    • CVE-2022-4141: Fixed an out of bounds memory write that could cause a crash or memory corruption (bsc#1205797).
    • CVE-2022-3705: Fixed an use-after-free issue that could cause a crash or memory corruption (bsc#1204779).
Record
SUSE-SU-2023:0209-1
Updated
2026-11-02
OSVUSN-6420-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 possibly execute arbitrary code. This issue only affected Ubuntu 22.04 LTS. (CVE-2022-3235, CVE-2022-3278, CVE-2022-3297, CVE-2022-3491)

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 possibly execute arbitrary code. This issue only affected Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-3352, CVE-2022-4292)

It was discovered that Vim incorrectly handled memory when replacing in virtualedit mode. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-3234)

It was discovered that Vim incorrectly handled memory when autocmd changes mark. An attacker could possibly use this issue to cause a denial of service. (CVE-2022-3256)

It was discovered that Vim did not properly perform checks on array index with negative width window. An attacker could possibly use this issue to cause a denial of service, or execute arbitrary code. (CVE-2022-3324)

It was discovered that Vim did not properly perform checks on a put command column with a visual block. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-3520)

It was discovered that Vim incorrectly handled memory when using autocommand to open a window. An attacker could possibly use this issue to cause a denial of service. (CVE-2022-3591)

It was discovered that Vim incorrectly handled memory when updating buffer of the component autocmd handler. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-3705)

It was discovered that Vim incorrectly handled floating point comparison with incorrect operator. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 20.04 LTS. and Ubuntu 22.04 LTS. (CVE-2022-4293)

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

Affected products

Affected packages

Affected packages
PackageAffectedFixed
vim
Debian:12
before 2:9.0.0813-1
2:9.0.0813-1
vim
Debian:13
before 2:9.0.0813-1
2:9.0.0813-1
vim
Debian:14
before 2:9.0.0813-1
2:9.0.0813-1
vim
openEuler:20.03-LTS-SP1
From an advisory covering 4 CVEs
before 9.0-3.oe1
9.0-3.oe1
vim
openEuler:20.03-LTS-SP3
From an advisory covering 4 CVEs
before 9.0-3.oe1
9.0-3.oe1
vim
openEuler:22.03-LTS
From an advisory covering 4 CVEs
before 9.0-4.oe2203
9.0-4.oe2203
vim
SUSE:Linux Enterprise Micro 5.3
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Module for Basesystem 15 SP4
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Module for Desktop Applications 15 SP4
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
Show 37 moreShow less
Affected packages
PackageAffectedFixed
vim
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Real Time 15 SP3
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Server 15 SP1-LTSS
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Server 15 SP2-LTSS
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Server 15 SP3-LTSS
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Server for SAP Applications 15 SP1
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Server for SAP Applications 15 SP2
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Server for SAP Applications 15 SP3
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Manager Proxy 4.1
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Manager Proxy 4.2
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Manager Retail Branch Server 4.1
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Manager Retail Branch Server 4.2
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Manager Server 4.1
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Manager Server 4.2
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Micro 5.1
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Linux Enterprise Micro 5.2
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Enterprise Storage 6
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Enterprise Storage 7
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:Enterprise Storage 7.1
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
openSUSE:Leap Micro 5.2
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
openSUSE:Leap Micro 5.3
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
openSUSE:Leap 15.3
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
openSUSE:Leap 15.4
From an advisory covering 7 CVEs
before 9.0.1040-150000.5.31.1
9.0.1040-150000.5.31.1
vim
SUSE:OpenStack Cloud 9
From an advisory covering 12 CVEs
before 9.0.1234-17.12.1
9.0.1234-17.12.1
vim
SUSE:OpenStack Cloud Crowbar 9
From an advisory covering 12 CVEs
before 9.0.1234-17.12.1
9.0.1234-17.12.1
vim
SUSE:Linux Enterprise Server for SAP Applications 12 SP4
From an advisory covering 12 CVEs
before 9.0.1234-17.12.1
9.0.1234-17.12.1
vim
SUSE:Linux Enterprise Server 12 SP2-BCL
From an advisory covering 12 CVEs
before 9.0.1234-17.12.1
9.0.1234-17.12.1
vim
SUSE:Linux Enterprise Server 12 SP4-LTSS
From an advisory covering 12 CVEs
before 9.0.1234-17.12.1
9.0.1234-17.12.1
vim
SUSE:Linux Enterprise Server 12 SP5
From an advisory covering 12 CVEs
before 9.0.1234-17.12.1
9.0.1234-17.12.1
vim
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
From an advisory covering 12 CVEs
before 9.0.1234-17.12.1
9.0.1234-17.12.1
vim
Ubuntu:22.04:LTS
before 2:8.2.3995-1ubuntu2.12, 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 12 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.42:8.2.3995-1ubuntu2.52:8.2.3995-1ubuntu2.72:8.2.3995-1ubuntu2.82:8.2.3995-1ubuntu2.92:8.2.3995-1ubuntu2.102:8.2.3995-1ubuntu2.11
2:8.2.3995-1ubuntu2.12
vim
Ubuntu:Pro:14.04:LTS
From an advisory covering 13 CVEs
before 2:7.4.052-1ubuntu3.1+esm13, 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 11 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+esm72:7.4.052-1ubuntu3.1+esm82:7.4.052-1ubuntu3.1+esm92:7.4.052-1ubuntu3.1+esm102:7.4.052-1ubuntu3.1+esm112:7.4.052-1ubuntu3.1+esm12
2:7.4.052-1ubuntu3.1+esm13
vim
Ubuntu:Pro:18.04:LTS
From an advisory covering 13 CVEs
before 2:8.0.1453-1ubuntu1.13+esm5, 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 15 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.112:8.0.1453-1ubuntu1.122:8.0.1453-1ubuntu1.132:8.0.1453-1ubuntu1.13+esm12:8.0.1453-1ubuntu1.13+esm32:8.0.1453-1ubuntu1.13+esm4
2:8.0.1453-1ubuntu1.13+esm5
vim
Ubuntu:20.04:LTS
From an advisory covering 13 CVEs
before 2:8.1.2269-1ubuntu5.18, 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 14 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.122:8.1.2269-1ubuntu5.132:8.1.2269-1ubuntu5.142:8.1.2269-1ubuntu5.152:8.1.2269-1ubuntu5.162:8.1.2269-1ubuntu5.17
2:8.1.2269-1ubuntu5.18
vim
Ubuntu:22.04:LTS
From an advisory covering 13 CVEs
before 2:8.2.3995-1ubuntu2.12, 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 12 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.42:8.2.3995-1ubuntu2.52:8.2.3995-1ubuntu2.72:8.2.3995-1ubuntu2.82:8.2.3995-1ubuntu2.92:8.2.3995-1ubuntu2.102:8.2.3995-1ubuntu2.11
2:8.2.3995-1ubuntu2.12

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-3491 is a medium vulnerability (CVSS 4.0) in Vim, published December 3, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.52%, the 44th percentile. Fixed in vim 2:9.0.0813-1.

References

Show 46 moreShow less
MoveEnter Open