Cloudanix VulnDB

CVE-2022-2000

High · 7.8

CVSS

7.8

EPSS

1.6%

Published

Jun 9, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the popular Vim text editor can let someone take over your computer if you open a specially crafted file with it.

Exploit Available
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-bounds write in Vim's memory handling allows corruption of adjacent memory regions when processing specially crafted input files, potentially enabling arbitrary code execution.

Why it matters to the business

Attackers can gain full control of developer or administrator workstations that use Vim to open untrusted files, resulting in data theft, malware deployment, or lateral movement across environments; the vulnerability has been public for over four years with available exploits but remains unpatched in many legacy installations.

How an attack unfolds

An attacker creates a file that triggers the out-of-bounds write when opened or edited in a vulnerable Vim binary. Publicly available proof-of-concept code demonstrates how to turn the memory corruption into code execution on the local system after the user interacts with the file.

How to fix it

Upgrade vim/vim to commit 98056533b96b6b5d8849641de93185dd7bcadc44 or later releases that contain the fix. Remove or isolate any remaining vulnerable binaries and verify the update via 'vim --version'.

How to confirm the fix worked

Confirm the installed Vim reports a version containing commit 98056533b96b6b5d8849641de93185dd7bcadc44 or newer; attempt to reproduce the crash with known test cases from the public exploit and monitor for memory sanitizer violations during file processing.

Typical attack path

  1. Craft malicious file designed to trigger out-of-bounds write in Vim
  2. Deliver file via email, download, or shared storage
  3. Social-engineer target into opening the file with Vim
  4. Exploit memory corruption to execute attacker-controlled code
  5. Establish persistence or pivot to other systems

How to detect it

Review system and process logs for unexpected Vim crashes or high-memory usage when opening files; correlate with file-access timestamps on documents that match known malicious patterns; monitor for child processes spawned from Vim that are not typical editors or shells.

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 unpatched Vim binaries until upgrades complete
  • Scan source repositories and build pipelines for pinned vulnerable Vim versions
  • Enable exploit mitigation features such as ASLR and compiler hardening on systems running Vim

The record

Out-of-bounds Write in GitHub repository vim/vim prior to 8.2.

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 vim 0 2:8.1.0875-5+deb10u4
Debian:11 vim 0 No fix
Debian:11 vim 0 2:8.2.2434-3+deb11u2
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
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:24.04:LTS vim 0 2:9.1.0-1ubuntu1
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+esm11
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:Tumbleweed vim 0 9.0.0453-2.1

Related vulnerabilities