Cloudanix VulnDB

CVE-2022-2849

High · 7.8

CVSS

7.8

EPSS

0.5%

Published

Aug 17, 2022

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in the Vim text editor could let attackers run harmful code on your computer if you open a specially made file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
Local User
Complexity
Low
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 allowing potential arbitrary code execution or denial of service when processing specially crafted input files.

Why it matters to the business

Attackers could compromise developer workstations or servers using Vim, leading to unauthorized code execution, data theft, or further lateral movement within an organization.

How an attack unfolds

An attacker creates a malicious file designed to overflow a heap buffer in Vim's parsing routines. When a user opens this file with a vulnerable version of Vim, the overflow can be leveraged to execute arbitrary code.

How to fix it

Upgrade Vim to a version containing commit f6d39c31d2177549a986d170e192d8351bd571e2 or later.

How to confirm the fix worked

Verify Vim version is 9.0.0220 or newer; test opening sample files if available.

Typical attack path

  1. Craft malicious file exploiting the buffer overflow
  2. Distribute the file to target users (e.g., via email or downloads)
  3. Victim opens the file using vulnerable Vim
  4. Exploit triggers heap overflow leading to code execution

How to detect it

Monitor system logs for Vim crashes or unexpected terminations when opening files; look for new processes spawned from Vim.

What your security team should do

  • Update all Vim installations to the fixed version immediately
  • Monitor for any exploit attempts in development environments
  • Educate users on risks of opening untrusted files

The record

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

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 vim 0 No fix
Debian:12 vim 0 2:9.0.0229-1
Debian:13 vim 0 2:9.0.0229-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.12
Ubuntu:20.04:LTS vim 0 2:8.1.2269-1ubuntu5.13
Ubuntu:22.04:LTS vim 0 2:8.2.3995-1ubuntu2.5
Ubuntu:Pro:14.04:LTS vim 0 No fix
Ubuntu:Pro:14.04:LTS vim 0 2:7.4.052-1ubuntu3.1+esm8
Ubuntu:Pro:16.04:LTS vim 0 No fix
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