CVE-2024-43802: vim Heap-based Buffer Overflow
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.
Advisory lineage
Upstream 0 · Downstream 5 · Related 6Timeline
- 26-08-2024PublishedVulnerability first disclosed.
- 03-11-2025Last 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- OSV · AlpineEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
- OSV · UbuntuEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
- OSV · DebianEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
- OSV · WolfiEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
- OSV · ChainguardEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
- NVDNIST4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
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
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected 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
- vim< 9.1.0697
Wolfi1 product
- vim< 9.1.0698-r0
6 vendors · 6 products