CVE-2022-1420
Medium · 5.5CVSS
5.5
EPSS
1.5%
Published
Apr 21, 2022
CISA due date
—
Cloudanix analysis
A bug in the Vim text editor can make the program crash when someone opens a specially made file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-range pointer offset in Vim's memory handling causes invalid memory access, leading to corruption that manifests as application crashes.
Why it matters to the business
Users of affected Vim versions may experience sudden editor crashes when handling certain files, interrupting development and editing workflows with no data loss beyond the current session.
How an attack unfolds
An attacker creates a specially crafted file that triggers the out-of-range pointer offset when opened in vulnerable Vim; because the issue requires local access and user interaction, the victim must open the file, at which point the offset dereference occurs and crashes the process.
How to fix it
Upgrade vim/vim to commit 8b91e71441069b1dde9ac9ff9d9a829b1b4aecca or later (corresponding to version 8.2.4774 or newer). Rebuild from source or obtain updated packages from distribution maintainers.
How to confirm the fix worked
Confirm the installed Vim reports version 8.2.4774 or newer; attempt to open known trigger files in a controlled environment and verify absence of crashes; review build logs or package metadata for the cited commit hash.
Typical attack path
- Craft a malicious file containing data that forces an out-of-range pointer calculation
- Deliver the file to the target via email, download, or shared storage
- Victim opens the file in a vulnerable Vim instance
- Vim performs the invalid pointer offset leading to a crash
How to detect it
Review system and application logs for Vim segmentation faults or abrupt process termination around the time users report crashes; correlate with file access events involving recently received or unusual files.
What your security team should do
- Prioritize patching Vim installations that process untrusted files
- Communicate the upgrade requirement to development teams using Vim
- Monitor for new releases and apply updates within standard change windows
The record
Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.4774.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:9 | vim-X11 | 0 | 2:8.2.2637-16.el9_0.2 |
| AlmaLinux:9 | vim-common | 0 | 2:8.2.2637-16.el9_0.2 |
| AlmaLinux:9 | vim-enhanced | 0 | 2:8.2.2637-16.el9_0.2 |
| AlmaLinux:9 | vim-filesystem | 0 | 2:8.2.2637-16.el9_0.2 |
| AlmaLinux:9 | vim-minimal | 0 | 2:8.2.2637-16.el9_0.2 |
| Debian:11 | vim | 0 | No fix |
| Debian:12 | vim | 0 | 2:8.2.4793-1 |
| Debian:13 | vim | 0 | 2:8.2.4793-1 |
| Debian:14 | vim | 0 | 2:8.2.4793-1 |
| Mageia:8 | vim | 0 | 8.2.4975-1.mga8 |
| Red Hat:enterprise_linux:9::appstream | vim | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-X11 | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-X11-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-common | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-common-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-debugsource | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-enhanced | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-enhanced-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-filesystem | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-minimal | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::appstream | vim-minimal-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-X11 | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-X11-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-common | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-common-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-debugsource | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-enhanced | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-enhanced-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-filesystem | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-minimal | 0 | 2:8.2.2637-16.el9_0.2 |
| Red Hat:enterprise_linux:9::baseos | vim-minimal-debuginfo | 0 | 2:8.2.2637-16.el9_0.2 |
| 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:18.04:LTS | vim | 0 | 2:8.0.1453-1ubuntu1.9 |
| Ubuntu:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.8 |
| Ubuntu:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.9 |
| Ubuntu:22.04:LTS | vim | 0 | 2:8.2.3995-1ubuntu2.1 |
| Ubuntu:Pro:14.04:LTS | vim | 0 | 2:7.4.052-1ubuntu3.1+esm5 |
| 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-2023-4752 Use After Free in GitHub repository vim/vim prior to 9.0.1858. Also affects vim-X11
- CVE-2022-1927 Buffer Over-read in GitHub repository vim/vim prior to 8.2. Also affects vim-X11
- CVE-2022-1897 Out-of-bounds Write in GitHub repository vim/vim prior to 8.2. Also affects vim-X11
- CVE-2022-1785 Out-of-bounds Write in GitHub repository vim/vim prior to 8.2.4977. Also affects vim-X11
- CVE-2022-0554 Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2. Also affects vim-X11
- 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