Every CVE Search/ Get API key

CVE-2021-4136

Heap-based Buffer Overflow in vim/vim

7.3 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
Low

Exploit likelihood

1.99%Up 1.4 points since Dec 20, 2021
90%50%10%1%

What each source reports

CVE List Score used 7.3

Heap-based Buffer Overflow in vim/vim

vim is vulnerable to Heap-based Buffer Overflow

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

vim is vulnerable to Heap-based Buffer Overflow

Record
EUVD-2021-34006
CVSS 3.0
7.3 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-85p4-xh3v-w37r 7.8

vim is vulnerable to Heap-based Buffer Overflow

vim is vulnerable to Heap-based Buffer Overflow

Record
GHSA-85p4-xh3v-w37r
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

vim is vulnerable to Heap-based Buffer Overflow

Record
CVE-2021-4136
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.3 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
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
OSVALPINE-CVE-2021-4136 7.8

vim is vulnerable to Heap-based Buffer Overflow

Record
ALPINE-CVE-2021-4136
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-7057 7.8

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

vim is vulnerable to Heap-based Buffer Overflow

Record
AZL-7057
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 7 moreShow less
OSVBELL-CVE-2021-4136 7.8

CVE-2021-4136 does not affect BellSoft software

Record
BELL-CVE-2021-4136
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 Heap-based Buffer Overflow

Record
CVE-2021-4136
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
OSVDEBIAN-CVE-2021-4136 7.8

vim is vulnerable to Heap-based Buffer Overflow

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

vim is vulnerable to Heap-based Buffer Overflow

Record
UBUNTU-CVE-2021-4136
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.3 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
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
OSVSUSE-SU-2022:2102-1 No score

Security update for vim

This update for vim fixes the following issues:

  • CVE-2017-17087: Fixed information leak via .swp files (bsc#1070955).
  • CVE-2021-3875: Fixed heap-based buffer overflow (bsc#1191770).
  • CVE-2021-3903: Fixed heap-based buffer overflow (bsc#1192167).
  • CVE-2021-3968: Fixed heap-based buffer overflow (bsc#1192902).
  • CVE-2021-3973: Fixed heap-based buffer overflow (bsc#1192903).
  • CVE-2021-3974: Fixed use-after-free (bsc#1192904).
  • CVE-2021-4069: Fixed use-after-free in ex_open()in src/ex_docmd.c (bsc#1193466).
  • CVE-2021-4136: Fixed heap-based buffer overflow (bsc#1193905).
  • CVE-2021-4166: Fixed out-of-bounds read (bsc#1194093).
  • CVE-2021-4192: Fixed use-after-free (bsc#1194217).
  • CVE-2021-4193: Fixed out-of-bounds read (bsc#1194216).
  • CVE-2022-0128: Fixed out-of-bounds read (bsc#1194388).
  • CVE-2022-0213: Fixed heap-based buffer overflow (bsc#1194885).
  • CVE-2022-0261: Fixed heap-based buffer overflow (bsc#1194872).
  • CVE-2022-0318: Fixed heap-based buffer overflow (bsc#1195004).
  • CVE-2022-0359: Fixed heap-based buffer overflow in init_ccline() in ex_getln.c (bsc#1195203).
  • CVE-2022-0392: Fixed heap-based buffer overflow (bsc#1195332).
  • CVE-2022-0407: Fixed heap-based buffer overflow (bsc#1195354).
  • CVE-2022-0696: Fixed NULL pointer dereference (bsc#1196361).
  • CVE-2022-1381: Fixed global heap buffer overflow in skip_range (bsc#1198596).
  • CVE-2022-1420: Fixed out-of-range pointer offset (bsc#1198748).
  • CVE-2022-1616: Fixed use-after-free in append_command (bsc#1199331).
  • CVE-2022-1619: Fixed heap-based Buffer Overflow in function cmdline_erase_chars (bsc#1199333).
  • CVE-2022-1620: Fixed NULL pointer dereference in function vim_regexec_string (bsc#1199334).
  • CVE-2022-1733: Fixed heap-based buffer overflow in cindent.c (bsc#1199655).
  • CVE-2022-1735: Fixed heap-based buffer overflow (bsc#1199651).
  • CVE-2022-1771: Fixed stack exhaustion (bsc#1199693).
  • CVE-2022-1785: Fixed out-of-bounds write (bsc#1199745).
  • CVE-2022-1796: Fixed use-after-free in find_pattern_in_path (bsc#1199747).
  • CVE-2022-1851: Fixed out-of-bounds read (bsc#1199936).
  • CVE-2022-1897: Fixed out-of-bounds write (bsc#1200010).
  • CVE-2022-1898: Fixed use-after-free (bsc#1200011).
  • CVE-2022-1927: Fixed buffer over-read (bsc#1200012).
Record
SUSE-SU-2022:2102-1
Updated
2026-11-02
OSVSUSE-SU-2022:4619-1 No score

Security update for vim

This update for vim fixes the following issues:

Updated to version 9.0.0814:

  • Fixing bsc#1192478 VUL-1: CVE-2021-3928: vim: vim is vulnerable to Stack-based Buffer Overflow
  • Fixing bsc#1203508 VUL-0: CVE-2022-3234: vim: Heap-based Buffer Overflow prior to 9.0.0483.
  • Fixing bsc#1203509 VUL-1: CVE-2022-3235: vim: Use After Free in GitHub prior to 9.0.0490.
  • Fixing bsc#1203820 VUL-0: CVE-2022-3324: vim: Stack-based Buffer Overflow in prior to 9.0.0598.
  • Fixing bsc#1204779 VUL-0: CVE-2022-3705: vim: use after free in function qf_update_buffer of the file quickfix.c
  • Fixing bsc#1203152 VUL-1: CVE-2022-2982: vim: use after free in qf_fill_buffer()
  • Fixing bsc#1203796 VUL-1: CVE-2022-3296: vim: stack out of bounds read in ex_finally() in ex_eval.c
  • Fixing bsc#1203797 VUL-1: CVE-2022-3297: vim: use-after-free in process_next_cpt_value() at insexpand.c
  • Fixing bsc#1203110 VUL-1: CVE-2022-3099: vim: Use After Free in ex_docmd.c
  • Fixing bsc#1203194 VUL-1: CVE-2022-3134: vim: use after free in do_tag()
  • Fixing bsc#1203272 VUL-1: CVE-2022-3153: vim: NULL Pointer Dereference in GitHub repository vim/vim prior to 9.0.0404.
  • Fixing bsc#1203799 VUL-1: CVE-2022-3278: vim: NULL pointer dereference in eval_next_non_blank() in eval.c
  • Fixing bsc#1203924 VUL-1: CVE-2022-3352: vim: vim: use after free
  • Fixing bsc#1203155 VUL-1: CVE-2022-2980: vim: null pointer dereference in do_mouse()
  • Fixing bsc#1202962 VUL-1: CVE-2022-3037: vim: Use After Free in vim prior to 9.0.0321
  • Fixing bsc#1200884 Vim: Error on startup
  • Fixing bsc#1200902 VUL-0: CVE-2022-2183: vim: Out-of-bounds Read through get_lisp_indent() Mon 13:32
  • Fixing bsc#1200903 VUL-0: CVE-2022-2182: vim: Heap-based Buffer Overflow through parse_cmd_address() Tue 08:37
  • Fixing bsc#1200904 VUL-0: CVE-2022-2175: vim: Buffer Over-read through cmdline_insert_reg() Tue 08:37
  • Fixing bsc#1201249 VUL-0: CVE-2022-2304: vim: stack buffer overflow in spell_dump_compl()
  • Fixing bsc#1201356 VUL-1: CVE-2022-2343: vim: Heap-based Buffer Overflow in GitHub repository vim prior to 9.0.0044
  • Fixing bsc#1201359 VUL-1: CVE-2022-2344: vim: Another Heap-based Buffer Overflow vim prior to 9.0.0045
  • Fixing bsc#1201363 VUL-1: CVE-2022-2345: vim: Use After Free in GitHub repository vim prior to 9.0.0046.
  • Fixing bsc#1201620 vim: SLE-15-SP4-Full-x86_64-GM-Media1 and vim-plugin-tlib-1.27-bp154.2.18.noarch issue
  • Fixing bsc#1202414 VUL-1: CVE-2022-2819: vim: Heap-based Buffer Overflow in compile_lock_unlock()
  • Fixing bsc#1202552 VUL-1: CVE-2022-2874: vim: NULL Pointer Dereference in generate_loadvar()
  • Fixing bsc#1200270 VUL-1: CVE-2022-1968: vim: use after free in utf_ptr2char
  • Fixing bsc#1200697 VUL-1: CVE-2022-2124: vim: out of bounds read in current_quote()
  • Fixing bsc#1200698 VUL-1: CVE-2022-2125: vim: out of bounds read in get_lisp_indent()
  • Fixing bsc#1200700 VUL-1: CVE-2022-2126: vim: out of bounds read in suggest_trie_walk()
  • Fixing bsc#1200701 VUL-1: CVE-2022-2129: vim: out of bounds write in vim_regsub_both()
  • Fixing bsc#1200732 VUL-1: CVE-2022-1720: vim: out of bounds read in grab_file_name()
  • Fixing bsc#1201132 VUL-1: CVE-2022-2264: vim: out of bounds read in inc()
  • Fixing bsc#1201133 VUL-1: CVE-2022-2284: vim: out of bounds read in utfc_ptr2len()
  • Fixing bsc#1201134 VUL-1: CVE-2022-2285: vim: negative size passed to memmove() due to integer overflow
  • Fixing bsc#1201135 VUL-1: CVE-2022-2286: vim: out of bounds read in ins_bytes()
  • Fixing bsc#1201136 VUL-1: CVE-2022-2287: vim: out of bounds read in suggest_trie_walk()
  • Fixing bsc#1201150 VUL-1: CVE-2022-2231: vim: null pointer dereference skipwhite()
  • Fixing bsc#1201151 VUL-1: CVE-2022-2210: vim: out of bounds read in ml_append_int()
  • Fixing bsc#1201152 VUL-1: CVE-2022-2208: vim: null pointer dereference in diff_check()
  • Fixing bsc#1201153 VUL-1: CVE-2022-2207: vim: out of bounds read in ins_bs()
  • Fixing bsc#1201154 VUL-1:…
Record
SUSE-SU-2022:4619-1
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 43 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
Mageia:8
From an advisory covering 4 CVEs
before 8.2.4006-1.mga8
8.2.4006-1.mga8
vim
SUSE:Linux Enterprise Module for Basesystem 15 SP3
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Module for Basesystem 15 SP4
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Module for Desktop Applications 15 SP3
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Module for Desktop Applications 15 SP4
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise High Performance Computing 15-ESPOS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise High Performance Computing 15-LTSS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server 15-LTSS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server 15 SP1-BCL
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server 15 SP1-LTSS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server 15 SP2-BCL
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server 15 SP2-LTSS
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server for SAP Applications 15
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server for SAP Applications 15 SP1
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Server for SAP Applications 15 SP2
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Manager Proxy 4.1
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Manager Retail Branch Server 4.1
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Manager Server 4.1
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Micro 5.1
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Linux Enterprise Micro 5.2
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Enterprise Storage 6
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:Enterprise Storage 7
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
openSUSE:Leap 15.3
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
openSUSE:Leap 15.4
From an advisory covering 45 CVEs
before 8.2.5038-150000.5.21.1
8.2.5038-150000.5.21.1
vim
SUSE:OpenStack Cloud 9
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1
vim
SUSE:OpenStack Cloud Crowbar 9
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1
vim
SUSE:Linux Enterprise Server for SAP Applications 12 SP4
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1
vim
SUSE:Linux Enterprise Server 12 SP2-BCL
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1
vim
SUSE:Linux Enterprise Server 12 SP3-BCL
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1
vim
SUSE:Linux Enterprise Server 12 SP4-LTSS
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1
vim
SUSE:Linux Enterprise Server 12 SP5
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1
vim
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
From an advisory covering 104 CVEs
before 9.0.0814-17.9.1
9.0.0814-17.9.1

History

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

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

In short

CVE-2021-4136 is a high vulnerability (CVSS 7.3) in Vim, published December 19, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.99%, the 80th percentile. Fixed in vim 8.2.4173-r0.

References

Show 194 moreShow less
This page doesn't list everything

Left out here: 35 references and the rest of 1 source description. The JSON record has them.

MoveEnter Open