CVE-2023-4735
High · 7.8CVSS
7.8
EPSS
0.6%
Published
Sep 2, 2023
CISA due date
—
Cloudanix analysis
A flaw in the Vim text editor can let attackers run their own programs on a computer if someone opens a specially made file, potentially giving them full control of that system.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds write in Vim's buffer handling allows memory corruption when processing specially crafted input, enabling potential arbitrary code execution with the privileges of the Vim process.
Why it matters to the business
Attackers can gain control of developer or administrator workstations that use Vim, leading to theft of source code, credentials, or lateral movement within development environments; the availability of public exploits increases urgency for patching.
How an attack unfolds
An attacker prepares a malicious file designed to trigger the out-of-bounds write vulnerability during parsing; when a user opens the file in a vulnerable Vim instance (via local access and user interaction), the memory corruption occurs and can be leveraged to execute attacker-controlled code.
How to fix it
Upgrade vim/vim (GIT) to commit 889f6af37164775192e33b233a90e86fd3df0f57 or later; rebuild and redeploy any custom Vim packages or distributions that incorporate the vulnerable code.
How to confirm the fix worked
Verify the installed Vim binary reports a version built from commit 889f6af37164775192e33b233a90e86fd3df0f57 or newer; test with known triggering inputs in a controlled environment to confirm the write boundary check is present.
Typical attack path
- Attacker crafts a malicious file exploiting the out-of-bounds write condition
- Attacker delivers the file to the target (e.g., via download, attachment, or repository)
- Victim opens the file using a vulnerable Vim binary
- Memory corruption is triggered during input processing
- Attacker payload achieves code execution within the Vim process context
How to detect it
Review process execution logs and file access records for Vim opening unexpected or recently received files; correlate with any observed crashes or memory corruption indicators in system logs; search for post-exploitation artifacts such as new processes spawned from Vim.
What your security team should do
- Immediately update all Vim installations to the fixed commit across development and production systems
- Scan internal repositories and build pipelines for any pinned vulnerable Vim versions or dependencies
- Monitor for new exploit code and update detection rules accordingly
- Educate users on avoiding untrusted files when using Vim until patches are applied
The record
Out-of-bounds Write in GitHub repository vim/vim prior to 9.0.1847.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.18 | vim | 0 | 9.0.2073-r0 |
| Alpine:v3.19 | vim | 0 | 9.0.1888-r0 |
| Alpine:v3.20 | vim | 0 | 9.0.1888-r0 |
| Alpine:v3.21 | vim | 0 | 9.0.1888-r0 |
| Alpine:v3.22 | vim | 0 | 9.0.1888-r0 |
| Debian:11 | vim | 0 | No fix |
| Debian:12 | vim | 0 | No fix |
| Debian:13 | vim | 0 | 2:9.0.1894-1 |
| Debian:14 | vim | 0 | 2:9.0.1894-1 |
| SUSE:Enterprise Storage 7.1 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Micro 5.1 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Micro 5.2 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Micro 5.3 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Micro 5.4 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Micro 5.5 | vim | 0 | 9.0.2103-150500.20.6.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | vim | 0 | 9.0.2103-150500.20.6.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP5 | vim | 0 | 9.0.2103-150500.20.6.1 |
| SUSE:Linux Enterprise Server 12 SP5 | vim | 0 | 9.0.1894-17.23.2 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | vim | 0 | 9.0.1894-17.23.2 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Manager Proxy 4.2 | vim | 0 | 9.0.1894-150000.5.54.1 |
| SUSE:Manager Server 4.2 | vim | 0 | 9.0.1894-150000.5.54.1 |
| Ubuntu:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.20 |
| Ubuntu:22.04:LTS | vim | 0 | 2:8.2.3995-1ubuntu2.13 |
| Ubuntu:23.10 | vim | 0 | 2:9.0.1672-1ubuntu2.1 |
| Ubuntu:Pro:14.04:LTS | vim | 0 | 2:7.4.052-1ubuntu3.1+esm14 |
| Ubuntu:Pro:16.04:LTS | vim | 0 | 2:7.4.1689-3ubuntu1.5+esm20 |
| Ubuntu:Pro:18.04:LTS | vim | 0 | 2:8.0.1453-1ubuntu1.13+esm6 |
| openSUSE:Leap 15.4 | vim | 0 | 9.0.1894-150000.5.54.1 |
| openSUSE:Leap 15.5 | vim | 0 | 9.0.2103-150500.20.6.1 |
| openSUSE:Tumbleweed | vim | 0 | 9.0.1894-1.1 |
Related vulnerabilities
- CVE-2023-5535 Use After Free in GitHub repository vim/vim prior to v9.0.2010. Also affects vim
- CVE-2023-5344 Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1969. Also affects vim
- CVE-2023-4781 Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1873. Also affects vim
- CVE-2023-4752 Use After Free in GitHub repository vim/vim prior to 9.0.1858. Also affects vim
- CVE-2023-4750 Use After Free in GitHub repository vim/vim prior to 9.0.1857. Also affects vim
- CVE-2023-4733 Use After Free in GitHub repository vim/vim prior to 9.0.1840. Also affects vim
- CVE-2023-4734 Integer Overflow or Wraparound in GitHub repository vim/vim prior to 9.0.1846. Also affects vim
- CVE-2021-4019 vim is vulnerable to Heap-based Buffer Overflow Also affects vim