Medium severity · published Aug 22, 2024
CVE-2024-43790
heap-buffer-overflow in do_search() in Vim < 9.1.0689
5.5
CVSS
0.3%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 23% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
VI
vim · vim
< v9.1.0689 · source: vendor, NVD
BO
Bootstrap OS · Netapp
All versions, or not specified · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-43790
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-43790
Patch
https://github.com/vim/vim/commit/cacb6693c10bb19f28a50eca47bc
Vendor Advisory
https://github.com/vim/vim/security/advisories/GHSA-v2x2-cjcg-f9jm
Third Party Advisory
https://security.netapp.com/advisory/ntap-20240920-0005/
More from vim
9.8
CVE-2020-20703
Buffer Overflow vulnerability in VIM v.8.1.2135 allows a remote attacker to execute arbitrary code via the operand parameter
9.8
CVE-2022-3520
Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0765
9.8
CVE-2022-0318
Heap-based Buffer Overflow in vim/vim prior to 8.2
9.8
CVE-2017-6350
An integer overflow at an unserialize_uep memory allocation site would occur for vim before patch 8.0.0378, if it does not properly validate values for tree length when reading a…
9.8
CVE-2017-6349
An integer overflow at a u_read_undo memory allocation site would occur for vim before patch 8.0.0377, if it does not properly validate values for tree length when reading a…
