Cloudanix VulnDB

CVE-2022-2598

Medium · 6.5

CVSS

6.5

EPSS

1.1%

Published

Aug 1, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Vim text editor could let specially crafted files crash the program or allow harmful code to run when opened.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Application
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Out-of-bounds write in Vim's API handling allows memory corruption when processing specially crafted input, potentially leading to crashes or arbitrary code execution.

Why it matters to the business

Developers and systems relying on Vim may experience application crashes or compromise when opening untrusted files, disrupting editing workflows and risking broader system access in environments where Vim runs with elevated privileges.

How an attack unfolds

An attacker prepares malicious input that triggers the out-of-bounds write in Vim's API; when a victim opens the file or processes the input in an affected version, memory corruption occurs that can be leveraged for denial of service or code execution.

How to fix it

Upgrade vim/vim to a version containing commit cb5ed4d6252a7c76c2f85ae95cb1e4e2bccc41fc or later (equivalent to 9.0.0100+). Rebuild from source or use distribution packages that incorporate the fix.

How to confirm the fix worked

Run 'vim --version' and confirm the version is 9.0.0100 or newer; test with known triggering inputs in a controlled environment to verify absence of the crash.

Typical attack path

  1. Craft malicious file or input targeting the vulnerable API path
  2. Deliver the file to the victim via email, download, or shared storage
  3. Victim opens the file in vulnerable Vim version
  4. Out-of-bounds write corrupts memory
  5. Attacker achieves crash or code execution

How to detect it

Review application crash logs and core dumps from Vim processes for signs of memory corruption; examine shell history or file access logs for unexpected Vim invocations on suspicious files.

What your security team should do

  • Prioritize upgrade of all Vim installations to the fixed commit or 9.0.0100+ within standard patching windows
  • Restrict Vim usage on untrusted files in high-privilege contexts until patched
  • Monitor for new Vim releases and integrate into automated update processes

The record

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

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 vim 0 2:8.1.0875-5+deb10u3
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: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 No fix
Ubuntu:Pro:14.04:LTS vim 0 2:7.4.052-1ubuntu3.1+esm12
Ubuntu:Pro:16.04:LTS vim 0 No fix
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