Every CVE Search/ Get API key

CVE-2024-43790

heap-buffer-overflow in do_search() in Vim < 9.1.0689

4.5 MediumFix available

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
Low

Exploit likelihood

0.31%Up 0.3 points since Aug 23, 2024
90%50%10%1%

What each source reports

CVE List Score used 4.5

heap-buffer-overflow in do_search() in Vim < 9.1.0689

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Record
CVE-2024-43790
CVSS 3.1
4.5 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Weakness
CWE-122
Updated
2026-11-02
EUVDEUVD-2024-40450 4.5

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Record
EUVD-2024-40450
CVSS 3.1
4.5 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Updated
2026-11-03
NVD 4.5

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Record
CVE-2024-43790
CVSS 3.1
4.5 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-122
Updated
2026-11-02
OSVALPINE-CVE-2024-43790 5.5

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Record
ALPINE-CVE-2024-43790
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
OSVBELL-CVE-2024-43790 5.5
Record
BELL-CVE-2024-43790
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSV 4.5

heap-buffer-overflow in do_search() in Vim < 9.1.0689

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Record
CVE-2024-43790
CVSS 3.1
4.5 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Weakness
CWE-122
Updated
2026-11-02
Show 5 moreShow less
OSVDEBIAN-CVE-2024-43790 5.5

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Record
DEBIAN-CVE-2024-43790
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVSUSE-SU-2025:0722-1 No score

Security update for vim

This update for vim fixes the following issues:

Update to version 9.1.1101:

  • CVE-2024-43790: possible out-of-bounds read when performing a search command (bsc#1229685).
  • CVE-2024-43802: heap buffer overflow due to incorrect flushing of the typeahead buffer (bsc#1229822).
  • CVE-2024-45306: heap buffer overflow when cursor position is invalid (bsc#1230078).
  • CVE-2025-22134: heap buffer overflow when switching to other buffers using the :all command with active visual mode (bsc#1235695).
  • CVE-2025-24014: NULL pointer dereference may lead to segmentation fault when in silent Ex mode (bsc#1236151).
  • CVE-2025-1215: memory corruption when manipulating the --log argument (bsc#1237137).
Record
SUSE-SU-2025:0722-1
Updated
2026-11-02
OSVSUSE-SU-2025:0723-1 No score

Security update for vim

This update for vim fixes the following issues:

Update to version 9.1.1101:

  • CVE-2024-43790: possible out-of-bounds read when performing a search command (bsc#1229685).
  • CVE-2024-43802: heap buffer overflow due to incorrect flushing of the typeahead buffer (bsc#1229822).
  • CVE-2024-45306: heap buffer overflow when cursor position is invalid (bsc#1230078).
  • CVE-2025-22134: heap buffer overflow when switching to other buffers using the :all command with active visual mode (bsc#1235695).
  • CVE-2025-24014: NULL pointer dereference may lead to segmentation fault when in silent Ex mode (bsc#1236151).
  • CVE-2025-1215: memory corruption when manipulating the --log argument (bsc#1237137).
Record
SUSE-SU-2025:0723-1
Updated
2026-11-02
OSVSUSE-SU-2025:0724-1 No score

Security update for vim

This update for vim fixes the following issues:

Update to version 9.1.1101:

  • CVE-2024-43790: possible out-of-bounds read when performing a search command (bsc#1229685).
  • CVE-2024-43802: heap buffer overflow due to incorrect flushing of the typeahead buffer (bsc#1229822).
  • CVE-2024-45306: heap buffer overflow when cursor position is invalid (bsc#1230078).
  • CVE-2025-22134: heap buffer overflow when switching to other buffers using the :all command with active visual mode (bsc#1235695).
  • CVE-2025-24014: NULL pointer dereference may lead to segmentation fault when in silent Ex mode (bsc#1236151).
  • CVE-2025-1215: memory corruption when manipulating the --log argument (bsc#1237137).
Record
SUSE-SU-2025:0724-1
Updated
2026-11-02
OSVSUSE-SU-2025:20128-1 No score

Security update for vim

This update for vim fixes the following issues:

vim was updated to 9.1.1101:

  • CVE-2024-43374: Fixed use-after-free in alist_add() (bsc#1229238)
  • CVE-2024-43790: Fixed Out of bounds read when performing a search command (bsc#1229685)
  • CVE-2024-43802: Fixed heap-buffer-overflow in ins_typebuf() (bsc#1229822)
  • CVE-2024-45306: Fixed heap-buffer-overflow in Vim (bsc#1230078)
  • CVE-2024-47814: Fixed use-after-free when closing buffers in Vim (bsc#1231373)
  • CVE-2025-1215: Fixed manipulation of the argument --log leads to memory corruption (bsc#1237137)
  • CVE-2025-22134: Fixed heap-buffer-overflow in Vim < 9.1.1003 (bsc#1235695)
  • CVE-2025-24014: Fixed segmentation fault in win_line() in Vim < 9.1.1043 (bsc#1236151)

Update to 9.1.1101:

  • insexpand.c hard to read
  • tests: Test_log_nonexistent only works on Linux
  • Update base-syntax, improve variable matching
  • Vim9: import with extends may crash
  • leaking memory with completing multi lines
  • --log with non-existent path causes a crash
  • if_perl: Perl 5.38 adds new symbols causing link failure
  • tests: matchparen plugin test wrongly named
  • Vim9: problem finding implemented method in type hierarchy
  • runtime(qf): Update syntax file, match second delimiter
  • tests: output of test ...win32_ctrl_z depends on python version
  • tests: fix expected return code for python 3.13 on Windows
  • tests: timeout might be a bit too small
  • tests: test_terminwscroll_topline2 unreliable
  • tests: No check when tests are run under Github actions
  • tests: plugin tests are named inconsistently
  • Vim9: import with extends may crash
  • completion doesn't work with multi lines
  • filetype: cmmt files are not recognized
  • Unable to persistently ignore events in a window and its buffers
  • improve syntax highlighting
  • setreg() doesn't correctly handle mbyte chars in blockwise mode
  • unexpected DCS responses may cause out of bounds reads
  • has('bsd') is true for GNU/Hurd
  • filetype: Mill files are not recognized
  • GUI late startup leads to uninitialized scrollbars
  • Add support for lz4 to tar & gzip plugin
  • Terminal ansi colors off by one after tgc reset
  • included syntax items do not understand contains=TOP
  • vim_strnchr() is strange and unnecessary
  • Vim9: len variable not used in compile_load()
  • runtime(vim): Update base-syntax, match :debuggreedy count prefix
  • Strange error when heredoc marker starts with "trim"
  • tests: test_compiler fails on Windows without Maven
  • 'diffopt' "linematch" cannot be used with {n} less than 10
  • args missing after failing to redefine a function
  • Cannot control cursor positioning of getchar()
  • preinsert text completions not deleted with <C-W>/<C-U>
  • getchar() can't distinguish between C-I and Tab
  • tests: Test_termwinscroll_topline2 fails on MacOS
  • heap-use-after-free and stack-use-after-scope with :14verbose
  • no digraph for "Approaches the limit"
  • not possible to use plural forms with gettext()
  • too many strlen() calls in userfunc.c
  • terminal: E315 when dragging the terminal with the mouse
  • runtime(openPlugin): fix unclosed parenthesis in GetWordUnderCursor()
  • runtime(doc): Tweak documentation style a bit
  • tests: test_glvs fails when unarchiver not available
  • Vim always enables 'termguicolors' in a terminal
  • completion: input text deleted with preinsert when adding leader
  • translation(sr): Missing Serbian translation for the tutor
  • Superfluous cleanup steps in test_ins_complete.vim
  • runtime(netrw): correct wrong version check
  • Vim doesn't highlight to be inserted text when completing
  • runtime(netrw): upstream snapshot of v176
  • runtime(dist/vim9): fix regressions in dist#vim9#Open
  • runtime(hyprlang): fix string recognition
  • make install fails because of a missing dependency
  • runtime(asm): add byte directives to syntax script
  • Vim doesn't work well with TERM=xterm-direct
  • runtime(filetype): commit 99181205c5f8284a3 breaks V…
Record
SUSE-SU-2025:20128-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
vim
Alpine:v3.20
9.1.0425 up to 9.1.0707-r0
9.1.0707-r0
vim
Alpine:v3.21
9.1.0425 up to 9.1.0707-r0
9.1.0707-r0
vim
Alpine:v3.22
9.1.0425 up to 9.1.0707-r0
9.1.0707-r0
vim
Alpine:v3.23
9.1.0425 up to 9.1.0707-r0
9.1.0707-r0
vim
Alpine:v3.24
9.1.0425 up to 9.1.0707-r0
9.1.0707-r0
vim
Alpaquita:23
9.0.0999-r0 up to 9.1.0936-r0
9.1.0936-r0
vim
Alpaquita:stream
9.1.0678-r0 up to 9.1.0707-r0
9.1.0707-r0
vim
Debian:12
All versions, plus listed versions
2:9.0.1378-22:9.0.1378-2+deb12u12:9.0.1378-2+deb12u22:9.0.1658-12:9.0.1672-1
Show 40 moreShow less
2:9.0.1894-12:9.0.2018-12:9.0.2087-12:9.0.2103-12:9.0.2116-12:9.0.2189-12:9.1.0-12:9.1.0016-12:9.1.0199-12:9.1.0374-12:9.1.0377-12:9.1.0496-12:9.1.0698-12:9.1.0709-12:9.1.0709-22:9.1.0777-12:9.1.0861-12:9.1.0967-12:9.1.0967-22:9.1.1113-12:9.1.1230-12:9.1.1230-22:9.1.1385-12:9.1.1766-12:9.1.1829-12:9.1.1846-12:9.1.1882-12:9.1.2103-12:9.1.2141-12:9.2.0119-12:9.2.0136-12:9.2.0218-12:9.2.0315-12:9.2.0338-12:9.2.0355-12:9.2.0428-12:9.2.0461-12:9.2.0524-12:9.2.0782-12:9.2.0858-1
None known
vim
Debian:13
before 2:9.1.0698-1
2:9.1.0698-1
vim
Debian:14
before 2:9.1.0698-1
2:9.1.0698-1
Show 10 moreShow less
Affected packages
PackageAffectedFixed
vim
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5
From an advisory covering 6 CVEs
before 9.1.1101-17.41.1
9.1.1101-17.41.1
vim
SUSE:Linux Enterprise Micro 5.5
From an advisory covering 6 CVEs
before 9.1.1101-150500.20.21.1
9.1.1101-150500.20.21.1
vim
SUSE:Linux Enterprise Module for Basesystem 15 SP6
From an advisory covering 6 CVEs
before 9.1.1101-150500.20.21.1
9.1.1101-150500.20.21.1
vim
SUSE:Linux Enterprise Module for Desktop Applications 15 SP6
From an advisory covering 6 CVEs
before 9.1.1101-150500.20.21.1
9.1.1101-150500.20.21.1
vim
openSUSE:Leap 15.6
From an advisory covering 6 CVEs
before 9.1.1101-150500.20.21.1
9.1.1101-150500.20.21.1
vim
SUSE:Linux Enterprise Micro 5.3
From an advisory covering 6 CVEs
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Enterprise Micro 5.4
From an advisory covering 6 CVEs
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Enterprise Micro 5.1
From an advisory covering 6 CVEs
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Enterprise Micro 5.2
From an advisory covering 6 CVEs
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Micro 6.0
From an advisory covering 8 CVEs
before 9.1.1101-1.1
9.1.1101-1.1

History

History
RecordedChangedSources
affected, facts
affectedOSV
aliases, publishedEUVD
first indexedCVE List, NVD, OSV

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

In short

CVE-2024-43790 is a medium vulnerability (CVSS 4.5) in Vim, published August 22, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.31%, the 23rd percentile. Fixed in vim 9.1.0707-r0.

References

Show 23 moreShow less
This page doesn't list everything

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

MoveEnter Open