CVE-2022-1771
Medium · 5.5CVSS
5.5
EPSS
1.2%
Published
May 18, 2022
CISA due date
—
Cloudanix analysis
A bug in the popular text editor Vim can make the program crash when someone opens a specially made file, interrupting work until the editor is updated.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Uncontrolled recursion in Vim's input processing leads to stack exhaustion and process crash when handling specially crafted files or buffers.
Why it matters to the business
Developers and system administrators lose access to the editor during routine file operations, interrupting workflows and risking loss of unsaved changes; widespread use of Vim across servers and workstations amplifies operational disruption.
How an attack unfolds
An attacker prepares a file containing deeply nested structures that trigger excessive recursion in Vim's parser; when a victim opens the file with Vim, the application crashes without further attacker interaction.
How to fix it
Upgrade vim/vim to commit 51f0bfb88a3554ca2dde777d78a59880d1ee37a8 or later release 8.2.4975 or newer; rebuild packages from source or apply vendor patches for all affected distributions.
How to confirm the fix worked
Confirm the installed Vim binary reports version 8.2.4975 or higher; test with known recursion-triggering test cases to verify the crash no longer occurs.
Typical attack path
- Craft a malicious text file containing deeply nested constructs
- Deliver the file to the target via email, download, or shared storage
- Victim opens the file using an affected Vim binary
- Vim enters uncontrolled recursion and terminates
How to detect it
Monitor system and application crash logs for unexpected Vim terminations; correlate file-open events with subsequent process crashes on developer or server hosts.
What your security team should do
- Prioritize patching Vim on developer workstations and build servers within the next maintenance window
- Add Vim version checks to automated configuration compliance scans
- Educate users to avoid opening untrusted files with Vim until patched
The record
Uncontrolled Recursion in GitHub repository vim/vim prior to 8.2.4975.
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 |
| SUSE:Enterprise Storage 6 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Enterprise Storage 7 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Micro 5.1 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Micro 5.2 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP3 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | vim | 0 | 8.2.5038-150000.5.21.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 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Server 15-LTSS | vim | 0 | 8.2.5038-150000.5.21.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 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Manager Proxy 4.1 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Manager Retail Branch Server 4.1 | vim | 0 | 8.2.5038-150000.5.21.1 |
| SUSE:Manager Server 4.1 | vim | 0 | 8.2.5038-150000.5.21.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:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.21 |
| Ubuntu:22.04:LTS | vim | 0 | 2:8.2.3995-1ubuntu2.15 |
| Ubuntu:23.10 | vim | 0 | 2:9.0.1672-1ubuntu2.2 |
| Ubuntu:Pro:14.04:LTS | vim | 0 | 2:7.4.052-1ubuntu3.1+esm15 |
| Ubuntu:Pro:16.04:LTS | vim | 0 | 2:7.4.1689-3ubuntu1.5+esm22 |
| Ubuntu:Pro:18.04:LTS | vim | 0 | 2:8.0.1453-1ubuntu1.13+esm7 |
| openSUSE:Leap 15.3 | vim | 0 | 8.2.5038-150000.5.21.1 |
| openSUSE:Leap 15.4 | vim | 0 | 8.2.5038-150000.5.21.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