Skip to content
Fencer Vulns
medium 4.5

CVE-2024-43790 json

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

published 2024-08-22 2 y ago modified 2026-06-17 4 mo ago also EUVD-2024-40450

cvss
4.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 23%
public exploits
0
none known

Summary

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.

Patch / fix

  • vim vim 9.1.0689
  • vim Debian 14, Debian 13 2:9.1.0698-1

debian advisories DEBIAN-CVE-2024-43790

  • vim SLE Micro 5.4, SLE Micro 5.3, SLE Micro 5.2 +1 more 9.1.1101-150000.5.69.1
  • vim SLE Module for Desktop Applications 15 SP6, SLE Module for Basesystem 15 SP6, SLE Micro 5.5 +1 more 9.1.1101-150500.20.21.1
  • vim Linux Micro 6.0 9.1.1101-1.1
  • vim SLES LTSS Extended Security 12 SP5 9.1.1101-17.41.1

suse advisories SUSE-SU-2025:0724-1SUSE-SU-2025:0723-1SUSE-SU-2025:0722-1SUSE-SU-2025:20128-1

  • vim Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 9.1.0707-r0

alpine advisories ALPINE-CVE-2024-43790

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-43790 updated cvss 4.2

vim: Out of bounds read when performing a search command

  • Red Hat Enterprise Linux 6 vim, vim-X11, vim-common, vim-minimal, vim-enhanced, vim-filesystem Red Hat Enterprise Linux 7 vim, vim-X11, vim-common, vim-minimal, vim-enhanced, vim-filesystem
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8, openshift/ose-rhel-coreos-9
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Enterprise Linux 8 vim, vim-X11, vim-common, vim-minimal, vim-enhanced, vim-filesystem Red Hat Enterprise Linux 9 vim, vim-X11, vim-common, vim-minimal, vim-enhanced, vim-filesystem Red Hat Enterprise Linux 10 vim
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.31% chance of exploitation in the next 30 days, higher than 23% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
NVD 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected products

  • vim vim

Classification

Weakness
  • CWE-122 Heap-based Buffer Overflow

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.