CVE-2024-43802heap-buffer-overflow in ins_typebuf() in Vim < 9.1.0697
- 4.5MediumCVSS base score
- 0.30%Exploitation in 30 daysEPSS · top 77% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 10 days later
· 10 days later
Published
- 14 months later
· 14 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| NVDNVD · Deferred | 3.1 | Medium4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
- EPSS (exploitation in 30 days)
- 0.30% · top 77% of all CVEs (14 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.5.
Affected products
References
References4
- https://github.com/vim/vim/security/advisories/GHSA-4ghr-c62x-cqfh (opens in a new tab)x_refsource_CONFIRM
- https://github.com/vim/vim/commit/322ba9108612bead5eb (opens in a new tab)x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20241004-0008/ (opens in a new tab)
- https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-40456 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-43802)Record last updated .