4.5

CVE-2024-43802: heap-buffer-overflow in ins_typebuf() in Vim < 9.1.0697

Deferred
AliasesALPINE-CVE-2024-43802UBUNTU-CVE-2024-43802USN-7048-1
Published 26-08-2024Last modified 03-11-2025

Vulnerability summary

CVE-2024-43802 is a medium (CVSS 4.5) Heap-based Buffer Overflow vulnerability in vim. EPSS estimates a 0.30% chance of exploitation in the next 30 days, higher than 23.9% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 4.5, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
4.5/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.30%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 5 · Related 6

Timeline

  1. 26-08-2024
    PublishedVulnerability first disclosed.
  2. 03-11-2025
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

0.30%

Chance of exploitation in the next 30 days

Percentile

24%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.30% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Alpine1 product
  • vim< 9.1.0707-r0
Chainguard1 product
  • vim< 9.1.0698-r0
Debian1 product
  • vim< 2:9.0.1378-2+deb12u1 | < 2:9.1.0698-1
Ubuntu1 product
  • vim< 2:7.4.052-1ubuntu3.1+esm19 | < 2:7.4.1689-3ubuntu1.5+esm25 | < 2:8.0.1453-1ubuntu1.13+esm10 | < 2:8.1.2269-1ubuntu5.25 | < 2:8.2.3995-1ubuntu2.19 | < 2:9.1.0016-1ubuntu7.3
Vim1 product
Wolfi1 product
  • vim< 9.1.0698-r0

6 vendors · 6 products

References

13 links
Show all 13 references