CVE-2022-0554
High · 7.8CVSS
7.8
EPSS
1.7%
Published
Feb 10, 2022
CISA due date
—
Cloudanix analysis
A problem in the Vim text editor could let someone take over your computer if you open a specially made file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-range pointer offset in Vim causes memory corruption when processing crafted input, enabling potential arbitrary code execution on the local system.
Why it matters to the business
Developers and users running vulnerable Vim versions risk full system compromise if tricked into opening malicious files, disrupting workflows and exposing sensitive code or data.
How an attack unfolds
An attacker creates a specially crafted file that triggers the out-of-range pointer offset in affected Vim versions. When a user opens the file locally with Vim, the memory corruption occurs, and with exploit code available, an attacker can achieve code execution without network access.
How to fix it
Upgrade all Vim installations to a version containing commit 98056533b96b6b5d8849641de93185dd7bcadc44 or later; rebuild from source or use updated packages from distribution repositories.
How to confirm the fix worked
Verify Vim version reports the fixed commit or is at least 8.2; test by attempting to open known triggering files in a controlled environment and confirm no crash or corruption occurs.
Typical attack path
- Create malicious file exploiting the pointer offset vulnerability
- Distribute the file via email, download, or shared storage
- Victim opens the file using a vulnerable Vim installation
- Out-of-range offset triggers memory corruption and executes attacker payload
How to detect it
Review system and application logs for Vim crashes or segmentation faults following file opens; monitor process behavior for unexpected memory writes or child process spawns after Vim usage.
What your security team should do
- Immediately update Vim to the fixed commit across all developer and server environments
- Restrict opening of untrusted files in Vim until patches are applied
- Scan systems for presence of older Vim binaries and remove or replace them
The record
Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.
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:10 | vim | 0 | 2:8.1.0875-5+deb10u3 |
| Debian:11 | vim | 0 | No fix |
| Debian:12 | vim | 0 | 2:8.2.4659-1 |
| Debian:13 | vim | 0 | 2:8.2.4659-1 |
| Debian:14 | vim | 0 | 2:8.2.4659-1 |
| Debian:9 | vim | 0 | 2:8.0.0197-4+deb9u5 |
| 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 |
| Ubuntu:18.04:LTS | vim | 0 | 2:8.0.1453-1ubuntu1.13 |
| Ubuntu:20.04:LTS | vim | 0 | 2:8.1.2269-1ubuntu5.14 |
| Ubuntu:22.04:LTS | vim | 0 | 2:8.2.3995-1ubuntu2.7 |
| Ubuntu:Pro:14.04:LTS | vim | 0 | 2:7.4.052-1ubuntu3.1+esm9 |
| Ubuntu:Pro:16.04:LTS | vim | 0 | 2:7.4.1689-3ubuntu1.5+esm6 |
| 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-1420 Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.4774. Also affects vim-X11
- CVE-2023-4781 Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1873. Also affects vim
- CVE-2023-2610 Integer Overflow or Wraparound in GitHub repository vim/vim prior to 9.0.1532. Also affects vim
- CVE-2022-3324 Stack-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0598. Also affects vim