Vim < 9.1.0689 Heap Buffer Overflow

medium Nessus Plugin ID 206347

Synopsis

A text editor installed on the remote Windows host is affected by a heap buffer overflow vulnerability.

Description

The version of Vim installed on the remote Windows host is after 9.1.0425 and prior to 9.1.0689. It is, therefore, affected by a heap buffer overflow vulnerability. 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.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Vim version 9.1.0689 or later.

See Also

https://github.com/vim/vim/security/advisories/GHSA-v2x2-cjcg-f9jm

Plugin Details

Severity: Medium

ID: 206347

File Name: vim_9_1_0689.nasl

Version: 1.3

Type: local

Agent: windows

Family: Windows

Published: 8/30/2024

Updated: 9/6/2024

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Low

Score: 3.4

CVSS v2

Risk Factor: Low

Base Score: 3.7

Temporal Score: 2.7

Vector: CVSS2#AV:L/AC:H/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2024-43790

CVSS v3

Risk Factor: Medium

Base Score: 4.5

Temporal Score: 3.9

Vector: CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:vim:vim

Required KB Items: SMB/Registry/Enumerated, installed_sw/Vim

Exploit Ease: No known exploits are available

Patch Publication Date: 5/21/2024

Vulnerability Publication Date: 8/22/2024

Reference Information

CVE: CVE-2024-43790

IAVA: 2024-A-0526-S