4.5

CVE-2024-43802: vim Heap-based Buffer Overflow

CVSS: 4.5v3.1MediumDeferred
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 20.9% of scored vulnerabilities.

Overall risk
18/100
0100
Low · default modelHow is this calculated?
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 listedIn no KEV catalog
RansomwareNone recordedNo known 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

21%

Versus all other CVEs

30-day change

0.00 pp

From 0.30% on 19-09-2026

19-09-202619-10-2026
EPSS score
0.30%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

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.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 | < 2:7.4.052-1ubuntu3.1+esm19
Vim1 product
Wolfi1 product
  • vim< 9.1.0698-r0

6 vendors · 6 products

References

13 links
Show all 13 references