Cloudanix VulnDB

CVE-2022-2874

Medium · 5.5

CVSS

5.5

EPSS

0.5%

Published

Aug 18, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the popular Vim text editor can make the program suddenly stop working when someone opens a specially made file.

Exploit Available
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

NULL pointer dereference in Vim's input handling leads to immediate process crash (denial of service) when a specially crafted file is opened.

Why it matters to the business

Users experience sudden editor crashes while editing files, potentially losing unsaved work and interrupting development or operations; widespread in environments relying on Vim for system administration or coding.

How an attack unfolds

An attacker prepares a malformed file that triggers the NULL dereference path in Vim's parser, then convinces a target to open the file locally with an affected Vim version, resulting in an immediate crash.

How to fix it

Upgrade vim/vim to commit 4875d6ab068f09df88d24d81de40dcd8d56e243d or later (version 9.0.0224 or newer). Rebuild any locally compiled instances and verify the new binary no longer crashes on the triggering input.

How to confirm the fix worked

Run 'vim --version' and confirm the build includes commit 4875d6ab or is at least 9.0.0224; test the fixed binary against a known triggering file to ensure it no longer aborts.

Typical attack path

  1. Craft a file containing input that reaches the vulnerable NULL dereference code path
  2. Deliver the file to the target via email, download link, or shared storage
  3. Victim opens the file using an affected Vim binary on their system
  4. Vim dereferences a NULL pointer and terminates

How to detect it

Review system and application crash logs for abrupt Vim terminations when users open files; correlate with file-access timestamps of recently received or downloaded files.

What your security team should do

  • Immediately update all Vim installations to the fixed commit across developer workstations and servers
  • Add Vim version checks to patch-management and CI pipelines
  • Block or sandbox untrusted files from being opened directly in Vim until updates are complete

The record

NULL Pointer Dereference in GitHub repository vim/vim prior to 9.0.0224.

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:20.04:LTS vim 0 2:8.1.2269-1ubuntu5.17
Ubuntu:22.04:LTS vim 0 2:8.2.3995-1ubuntu2.11
Ubuntu:Pro:14.04:LTS vim 0 2:7.4.052-1ubuntu3.1+esm12
Ubuntu:Pro:18.04:LTS vim 0 2:8.0.1453-1ubuntu1.13+esm4
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