Every CVE Search/ Get API key

CVE-2024-45306

heap-buffer-overflow in Vim

4.5 MediumFix available

Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

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.30%Up 0.3 points since Sep 3, 2024
90%50%10%1%

What each source reports

CVE List Score used 4.5

heap-buffer-overflow in Vim

Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

Record
CVE-2024-45306
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-41429 4.5

Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

Record
EUVD-2024-41429
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. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

Record
CVE-2024-45306
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:N/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-122, CWE-787
Updated
2026-11-02
OSVBELL-CVE-2024-45306 5.5
Record
BELL-CVE-2024-45306
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSV 4.5

heap-buffer-overflow in Vim

Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

Record
CVE-2024-45306
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
OSVDEBIAN-CVE-2024-45306 5.5

Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

Record
DEBIAN-CVE-2024-45306
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 4 moreShow less
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
Alpaquita:stream
9.1.0414-r0 up to 9.1.0707-r0
9.1.0707-r0
vim
Debian:13
before 2:9.1.0709-1
2:9.1.0709-1
vim
Debian:14
before 2:9.1.0709-1
2:9.1.0709-1
vim
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5
before 9.1.1101-17.41.1
9.1.1101-17.41.1
vim
SUSE:Linux Enterprise Micro 5.5
before 9.1.1101-150500.20.21.1
9.1.1101-150500.20.21.1
vim
SUSE:Linux Enterprise Module for Basesystem 15 SP6
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
before 9.1.1101-150500.20.21.1
9.1.1101-150500.20.21.1
vim
openSUSE:Leap 15.6
before 9.1.1101-150500.20.21.1
9.1.1101-150500.20.21.1
vim
SUSE:Linux Enterprise Micro 5.3
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Enterprise Micro 5.4
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Enterprise Micro 5.1
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Enterprise Micro 5.2
before 9.1.1101-150000.5.69.1
9.1.1101-150000.5.69.1
vim
SUSE:Linux Micro 6.0
before 9.1.1101-1.1
9.1.1101-1.1

History

History
RecordedChangedSources
aliases, publishedEUVD
first indexedCVE List, NVD, OSV

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

In short

CVE-2024-45306 is a medium vulnerability (CVSS 4.5) in Vim, published September 2, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.30%, the 22nd 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