Cloudanix VulnDB

CVE-2022-2207

High · 7.8

CVSS

7.8

EPSS

1.4%

Published

Jun 27, 2022

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in the popular Vim text editor could let someone take over your computer if you open a specially made file with it.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Full Compromise
Component
Application
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-based buffer overflow in Vim that can corrupt memory structures and enable arbitrary code execution or application crashes when processing specially crafted input files.

Why it matters to the business

Attackers could gain control of systems running vulnerable Vim versions, leading to data theft, ransomware deployment, or service disruption; organizations relying on Vim for editing or development face elevated risk until patched, especially given public exploit availability.

How an attack unfolds

An attacker creates a malicious file that triggers the heap overflow on open; the victim opens the file with Vim, allowing the attacker to execute code or crash the editor. Public exploits exist and could be used by opportunistic actors or automated tools.

How to fix it

Upgrade Vim to the fixed commit 98056533b96b6b5d8849641de93185dd7bcadc44 or later stable release (8.2+). Rebuild from source or obtain updated packages from distribution repositories. Disable unnecessary Vim plugins and avoid opening untrusted files until updated.

How to confirm the fix worked

Verify the installed Vim version reports the fixed commit or 8.2+. Test with known proof-of-concept inputs in a sandbox to confirm the overflow no longer occurs. Monitor build logs and package managers for successful updates across developer workstations and servers.

Typical attack path

  1. Attacker crafts a file containing oversized or malformed data designed to overflow a heap buffer in Vim.
  2. Attacker delivers the malicious file via email, download link, or shared repository.
  3. Victim opens the file using a vulnerable Vim binary (prior to the 98056533b96b6b5d8849641de93185dd7bcadc44 commit).
  4. Overflow occurs during parsing or rendering, enabling code execution or denial of service.
  5. Attacker establishes persistence or exfiltrates data if the payload succeeds.

How to detect it

Review system and application logs for Vim segmentation faults or abnormal memory usage when editing files. Correlate file open events with subsequent suspicious process activity or outbound connections from Vim. Examine crash dumps or core files for heap corruption patterns.

What your security team should do

  • Prioritize patching all Vim installations within 30 days due to public exploit availability.
  • Scan source control and build pipelines for pinned vulnerable Vim versions and update references.
  • Educate developers on risks of opening untrusted files and enforce use of sandboxed editing environments.
  • Add Vim version checks to vulnerability scanning and asset inventory processes.

The record

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

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.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+esm11
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