CVE-2022-3591
High · 7.8CVSS
7.8
EPSS
0.4%
Published
Dec 2, 2022
CISA due date
—
Cloudanix analysis
A bug in the popular Vim text editor could let someone take over your computer if you open a specially crafted file with an old version.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free memory corruption in the Vim editor that can lead to arbitrary code execution when processing specially crafted input.
Why it matters to the business
Attackers could gain control of developer or administrator workstations that run Vim, enabling theft of source code, credentials, or lateral movement; the issue affects a widely used editor with high ecosystem prevalence but low observed exploitation.
How an attack unfolds
An attacker crafts a file that triggers the use-after-free condition inside Vim; when a victim opens the file the freed memory is reused for attacker-controlled data, resulting in code execution. No named threat actors or ransomware campaigns are associated with this CVE.
How to fix it
Upgrade vim/vim to commit 8f3c3c6cd044e3b5bf08dbfa3b3f04bb3f711bad or later (equivalent to version 9.0.0789 or newer). Rebuild any locally compiled installations from the patched source.
How to confirm the fix worked
Run 'vim --version' and confirm the build includes commit 8f3c3c6cd044e3b5bf08dbfa3b3f04bb3f711bad or is newer than 9.0.0789; test opening known trigger files in a controlled environment to verify absence of crashes or unexpected behavior.
Typical attack path
- Craft a malicious file that exercises the use-after-free path in Vim
- Deliver the file via email, repository, or shared storage
- Trick the target user into opening the file with an affected Vim binary
- Execute arbitrary code in the context of the Vim process
How to detect it
Review system and application logs for unexpected Vim process crashes or memory corruption signals around the time a suspicious file was opened; correlate file access timestamps with editor execution events.
What your security team should do
- Immediately update all Vim installations to the fixed commit across developer and server environments
- Block or sandbox execution of untrusted files with Vim until patches are deployed
- Monitor vulnerability feeds for any future EPSS increase or KEV addition given the 1416-day publication age
The record
Use After Free in GitHub repository vim/vim prior to 9.0.0789.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | vim | 0 | No fix |
| Debian:12 | vim | 0 | 2:9.0.0813-1 |
| Debian:13 | vim | 0 | 2:9.0.0813-1 |
| Debian:14 | vim | 0 | 2:9.0.0813-1 |
| SUSE:Enterprise Storage 6 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Enterprise Storage 7 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Enterprise Storage 7.1 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Micro 5.1 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Micro 5.2 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Micro 5.3 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Real Time 15 SP3 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | vim | 0 | 9.0.1234-17.12.1 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | vim | 0 | 9.0.1234-17.12.1 |
| SUSE:Linux Enterprise Server 12 SP5 | vim | 0 | 9.0.1234-17.12.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | vim | 0 | 9.0.1234-17.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | vim | 0 | 9.0.1234-17.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Manager Proxy 4.1 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Manager Proxy 4.2 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Manager Retail Branch Server 4.1 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Manager Retail Branch Server 4.2 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Manager Server 4.1 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:Manager Server 4.2 | vim | 0 | 9.0.1040-150000.5.31.1 |
| SUSE:OpenStack Cloud 9 | vim | 0 | 9.0.1234-17.12.1 |
| SUSE:OpenStack Cloud Crowbar 9 | vim | 0 | 9.0.1234-17.12.1 |
| Ubuntu:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.18 |
| Ubuntu:22.04:LTS | vim | 0 | 2:8.2.3995-1ubuntu2.12 |
| Ubuntu:Pro:14.04:LTS | vim | 0 | 2:7.4.052-1ubuntu3.1+esm13 |
| Ubuntu:Pro:16.04:LTS | vim | 0 | 2:7.4.1689-3ubuntu1.5+esm14 |
| Ubuntu:Pro:18.04:LTS | vim | 0 | 2:8.0.1453-1ubuntu1.13+esm5 |
| openSUSE:Leap 15.3 | vim | 0 | 9.0.1040-150000.5.31.1 |
| openSUSE:Leap 15.4 | vim | 0 | 9.0.1040-150000.5.31.1 |
| openSUSE:Leap Micro 5.2 | vim | 0 | 9.0.1040-150000.5.31.1 |
| openSUSE:Leap Micro 5.3 | vim | 0 | 9.0.1040-150000.5.31.1 |
Related vulnerabilities
- CVE-2025-29768 Vim, a text editor, is vulnerable to potential data loss with zip.vim and special crafted… Also affects vim
- CVE-2025-27423 Vim is an open source, command line text editor. Also affects vim
- CVE-2025-24014 Vim is an open source, command line text editor. Also affects vim
- CVE-2025-22134 When switching to other buffers using the :all command and visual mode still being… Also affects vim
- CVE-2024-47814 Vim is an open source, command line text editor. Also affects vim
- CVE-2024-43802 Vim is an improved version of the unix vi text editor. Also affects vim
- CVE-2024-43374 The UNIX editor Vim prior to version 9.1.0678 has a use-after-free error in argument list… Also affects vim
- CVE-2024-22667 Vim before 9.0.2142 has a stack-based buffer overflow because did_set_langmap in map.c… Also affects vim