# CVE-2024-45306: heap-buffer-overflow in Vim

- Severity: Medium 4.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Published: 2024-09-02T16:35:17.444Z
- Modified: 2026-06-17T07:53:59.520Z
- Weaknesses: CWE-122, CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- vim vim: >= 9.1.0038, < 9.1.0707; from 9.1.0038 before 9.1.0707

## Every score

- GitHub_M: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`

## References

- <https://github.com/vim/vim/security/advisories/GHSA-wxf9-c5gx-qrwr> (third-party-advisory)
- <https://github.com/vim/vim/commit/396fd1ec2956307755392a1> (patch)
- <https://github.com/vim/vim/releases/tag/v9.1.0038> (release-notes)
- <https://security.netapp.com/advisory/ntap-20241004-0007/>

## Sources

- CVE List: [CVE-2024-45306](https://www.cve.org/CVERecord?id=CVE-2024-45306), CVE Terms of Use, modified 2024-10-04
- NVD: [CVE-2024-45306](https://nvd.nist.gov/vuln/detail/CVE-2024-45306), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-45306 · Whole record: https://cve.day/CVE-2024-45306.json · Rebuilt by cve.day 2026-11-25T22:58:44.996Z
