CVE-2022-2581
High · 7.8CVSS
7.8
EPSS
0.5%
Published
Aug 1, 2022
CISA due date
—
Cloudanix analysis
A problem in the Vim text editor could let a bad file someone tricks you into opening read parts of your computer's memory or make the program crash.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds read in Vim's buffer handling allows reading memory beyond allocated structures when processing crafted input.
Why it matters to the business
Attackers may extract sensitive data from memory or crash the editor when users open malicious files, interrupting development and editing workflows; low but persistent risk given widespread Vim usage and available exploits.
How an attack unfolds
An attacker creates a specially crafted file that triggers the out-of-bounds read when opened in vulnerable Vim; with public exploits available, the victim opens the file locally, allowing memory disclosure or denial of service.
How to fix it
Upgrade vim/vim to commit 1e56bda9048a9625bce6e660938c834c5c15b07d or later; rebuild from source or obtain updated packages containing this fix.
How to confirm the fix worked
Verify Vim reports version incorporating commit 1e56bda9048a9625bce6e660938c834c5c15b07d; test opening known trigger files to confirm no crash or unexpected behavior.
Typical attack path
- Craft malicious file exploiting out-of-bounds read
- Deliver file via email, download, or shared storage
- Victim opens file with vulnerable Vim version
- Vim performs out-of-bounds memory read
- Attacker observes disclosure or crash
How to detect it
Monitor system logs and process monitors for Vim crashes or segmentation faults when handling files; review shell history and file access logs for suspicious Vim invocations on untrusted inputs.
What your security team should do
- Prioritize updating all Vim installations to the fixed commit
- Educate users on risks of opening untrusted files in Vim
- Scan for and remove any known exploit samples from development environments
The record
Out-of-bounds Read in GitHub repository vim/vim prior to 9.0.0104.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | vim | 0 | No fix |
| Debian:12 | vim | 0 | 2:9.0.0135-1 |
| Debian:13 | vim | 0 | 2:9.0.0135-1 |
| Mageia:8 | vim | 0 | 9.0.828-1.mga8 |
| SUSE:Enterprise Storage 6 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Enterprise Storage 7 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Micro 5.1 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Micro 5.2 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP3 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 12 SP5 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server 15 SP1-BCL | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server 15-LTSS | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Manager Proxy 4.1 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Manager Retail Branch Server 4.1 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:Manager Server 4.1 | vim | 0 | 9.0.0313-150000.5.25.1 |
| SUSE:OpenStack Cloud 9 | vim | 0 | 9.0.0814-17.9.1 |
| SUSE:OpenStack Cloud Crowbar 9 | vim | 0 | 9.0.0814-17.9.1 |
| Ubuntu:18.04:LTS | vim | 0 | 2:8.0.1453-1ubuntu1.12 |
| Ubuntu:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.13 |
| Ubuntu:22.04:LTS | vim | 0 | 2:8.2.3995-1ubuntu2.5 |
| Ubuntu:Pro:14.04:LTS | vim | 0 | 2:7.4.052-1ubuntu3.1+esm8 |
| Ubuntu:Pro:16.04:LTS | vim | 0 | 2:7.4.1689-3ubuntu1.5+esm14 |
| openSUSE:Leap 15.3 | vim | 0 | 9.0.0313-150000.5.25.1 |
| openSUSE:Leap 15.4 | vim | 0 | 9.0.0313-150000.5.25.1 |
| openSUSE:Leap Micro 5.2 | vim | 0 | 9.0.0313-150000.5.25.1 |
| openSUSE:Tumbleweed | vim | 0 | 9.0.0453-2.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