What’s Vulnerable › Vulnerabilities
CVE-2024-45306: heap-buffer-overflow in Vim
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-09-02 · updated 2026-06-17
- Weakness: CWE-122
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.
Affected products
- vim/vim: from 9.1.0038 before 9.1.0707 — fixed in 9.1.0707
How to fix
Upgrade to a fixed version: vim/vim 9.1.0707. Check the vendor advisory for mitigations.
References
- https://github.com/vim/vim/commit/396fd1ec2956307755392a1
- https://github.com/vim/vim/releases/tag/v9.1.0038
- https://github.com/vim/vim/security/advisories/GHSA-wxf9-c5gx-qrwr
- https://security.netapp.com/advisory/ntap-20241004-0007/
Get alerted when CVE-2024-45306 or the next vulnerability affects your stack