CVE-2024-43802

heap-buffer-overflow in ins_typebuf() in Vim < 9.1.0697

MEDIUM
4.5
CVSS Score
Published: August 26, 2024 at 06:48 PM UTC
Updated: June 17, 2026 at 07:51 AM UTC
1 product affected across 1 vendorVim

Using vim by vim?

Get instant alerts when new vulnerabilities affect vim - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.5
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

Vim is an improved version of the unix vi text editor. When flushing the typeahead buffer, Vim moves the current position in the typeahead buffer but does not check whether there is enough space left in the buffer to handle the next characters. So this may lead to the tb_off position within the typebuf variable to point outside of the valid buffer size, which can then later lead to a heap-buffer overflow in e.g. ins_typebuf(). Therefore, when flushing the typeahead buffer, check if there is enough space left before advancing the off position. If not, fall back to flush current typebuf contents. It's not quite clear yet, what can lead to this situation. It seems to happen when error messages occur (which will cause Vim to flush the typeahead buffer) in comnination with several long mappgins and so it may eventually move the off position out of a valid buffer size. Impact is low since it is not easily reproducible and requires to have several mappings active and run into some error condition. But when this happens, this will cause a crash. The issue has been fixed as of Vim patch v9.1.0697. Users are advised to upgrade. There are no known workarounds for this issue.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 9.1.0697
Affected range stops below 9.1.0697, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.5MEDIUMGitHub_M
Attack Vector
LOCAL
Complexity
HIGH
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
LOW
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-122

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card