CVE-2024-45306: vim Heap-based Buffer Overflow
Vulnerability summary
CVE-2024-45306 is a medium (CVSS 5.5) Heap-based Buffer Overflow vulnerability in vim. EPSS estimates a 0.30% chance of exploitation in the next 30 days, higher than 21.1% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 4 · Related 7Timeline
- 02-09-2024PublishedVulnerability first disclosed.
- 04-10-2024Last modifiedVulnerability information updated.
Description
Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.
CVSS metrics
5 scores · 5 sources · 1 version- CVE.orgCNA4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:LDiffers
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- OSV · WolfiEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:LDiffers
- OSV · ChainguardEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:LDiffers
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 cause- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
Chainguard1 product
- vim< 9.1.0718-r0
Debian1 product
- vim< 2:9.1.0709-1
Vim1 product
- vim≥ 9.1.0038, < 9.1.0707
Wolfi1 product
- vim< 9.1.0718-r0
4 vendors · 4 products
References
7 links- github.com/vim/vim/security/advisories/GHSA-wxf9-c5gx-qrwrX Refsource CONFIRMAdvisoryThird Party Advisory