Skip to content
Fencer Vulns
medium 4.5

CVE-2024-43802 json

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

published 2024-08-26 2 y ago modified 2026-06-17 4 mo ago also EUVD-2024-40456

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 22%
public exploits
0
none known

Summary

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.

Patch / fix

  • vim vim 9.1.0697
  • vim Debian 12 2:9.0.1378-2+deb12u1
  • vim Debian 14, Debian 13 2:9.1.0698-1

debian advisories DEBIAN-CVE-2024-43802

  • vim Ubuntu 20.04 LTS 2:8.1.2269-1ubuntu5.25
  • vim Ubuntu 22.04 LTS 2:8.2.3995-1ubuntu2.19
  • vim Ubuntu 24.04 LTS 2:9.1.0016-1ubuntu7.3
  • vim Ubuntu Pro 14.04 LTS 2:7.4.052-1ubuntu3.1+esm19
  • vim Ubuntu Pro 16.04 LTS 2:7.4.1689-3ubuntu1.5+esm25
  • vim Ubuntu Pro 18.04 LTS 2:8.0.1453-1ubuntu1.13+esm10

ubuntu advisories UBUNTU-CVE-2024-43802

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • 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-43802

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

  • vim CBL-Mariner 2.0, Azure Linux 3.0 9.1.0697-1

azure linux advisories AZL-48221AZL-48282

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

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-43802 updated cvss 4.5

vim: Heap Buffer Overflow in Vim's Typeahead Buffer Handling

  • 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 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 Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8, openshift/ose-rhel-coreos-9
    affected: workaround, no fix available “Fix deferred”
  • Red Hat OpenShift AI (RHOAI) rhoai/odh-dashboard-rhel9
    under investigation

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.30% chance of exploitation in the next 30 days, higher than 22% 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

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.