Integer Overflow or Wraparound in vim/vim
Description
An integer overflow in Vim before 9.0.1846 can cause a crash or arbitrary code execution when a crafted file is parsed.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An integer overflow in Vim before 9.0.1846 can cause a crash or arbitrary code execution when a crafted file is parsed.
Vulnerability
An integer overflow or wraparound vulnerability exists in the fullcommand() function of Vim prior to version 9.0.1846. The issue occurs when the function receives an integer argument that is not a valid string pointer, leading to a memory safety violation. This was addressed in commit 4c6fe2e which replaced the direct access to argvars[0].vval.v_string with a call to tv_get_string() that properly handles non-string types [2]. The vulnerability is reachable when Vim parses a specially crafted file, as noted in Apple's security advisory [1].
Exploitation
An attacker can exploit this vulnerability by convincing a target to open a malicious file in Vim. No special network position or authentication is required, as the attack vector relies on user interaction. The crafted file triggers the code path in f_fullcommand(), causing the integer to be treated as a pointer, which leads to a read from an invalid memory address. The provided test case fullcommand(10) demonstrates that passing a non-string argument like the integer 10 triggers the crash [2].
Impact
Successful exploitation can lead to an unexpected application termination (crash) or arbitrary code execution with the privileges of the Vim process. Apple's advisory describes the impact as "parsing a file may lead to an unexpected app termination or arbitrary code execution" [1]. An attacker could potentially execute arbitrary commands on the affected system.
Mitigation
Users should update to Vim version 9.0.1846 or later, which contains the fix [2]. Apple has also addressed this vulnerability in macOS Sonoma 14.1, released on October 25, 2023, by removing the vulnerable code [1]. No workarounds are available, and users are strongly advised to apply the latest patches.
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
29- osv-coords27 versionspkg:rpm/opensuse/vim&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/vim&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/vim&distro=openSUSE%20Tumbleweedpkg:rpm/suse/vim&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.2pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.3pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Micro%205.5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP4pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/vim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/vim&distro=SUSE%20Manager%20Proxy%204.2pkg:rpm/suse/vim&distro=SUSE%20Manager%20Server%204.2
< 9.0.1894-150000.5.54.1+ 26 more
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.2103-150500.20.6.1
- (no CPE)range: < 9.0.1894-1.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.2103-150500.20.6.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.2103-150500.20.6.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.2103-150500.20.6.1
- (no CPE)range: < 9.0.1894-17.23.2
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-17.23.2
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
- (no CPE)range: < 9.0.1894-150000.5.54.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4News mentions
0No linked articles in our index yet.