Cloudanix VulnDB

CVE-2022-3491

High · 7.8

CVSS

7.8

EPSS

0.5%

Published

Dec 3, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A problem in the Vim text editor could let someone take over a computer if a person opens a specially prepared file with it.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
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 that can lead to memory corruption and potential arbitrary code execution when processing specially crafted input files.

Why it matters to the business

Attackers could gain control of developer or administrator workstations running Vim, potentially leading to theft of source code, credentials, or further lateral movement; prevalence in software development environments increases exposure risk despite low exploitation probability.

How an attack unfolds

An attacker creates a malicious file designed to trigger the heap overflow in vulnerable Vim versions. The victim opens the file locally in Vim, causing the overflow to corrupt memory and allow code execution under the user's privileges. Public exploits exist but require user interaction and have not been observed in widespread campaigns.

How to fix it

Upgrade Vim to a version containing commit 3558afe9e9e904cabb8475392d859f2d2fc21041 (equivalent to 9.0.0742 or later). Rebuild from source or obtain updated packages from distribution repositories. Avoid opening untrusted files until patched.

How to confirm the fix worked

Run 'vim --version' and confirm the version string shows 9.0.0742 or higher, or verify the applied commit hash matches the fix. Test with known proof-of-concept inputs if available in a controlled environment.

Typical attack path

  1. Identify or craft a file that triggers the heap buffer overflow in Vim
  2. Deliver the file to the target via email, download, or shared storage
  3. Victim opens the file using a vulnerable Vim instance
  4. Overflow corrupts heap memory and redirects execution to attacker-controlled code
  5. Attacker executes commands or installs persistence on the local system

How to detect it

Review system logs for unexpected Vim process terminations or crashes around the time users report opening suspicious files. Correlate with process creation events showing Vim spawning unusual child processes or network connections.

What your security team should do

  • Prioritize patching Vim installations across development and operations teams
  • Implement application allow-listing or sandboxing for text editors where feasible
  • Educate users to avoid opening files from untrusted sources with Vim
  • Monitor vulnerability feeds for any increase in EPSS or addition to KEV lists

The record

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

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 vim 0 No fix
Debian:12 vim 0 2:9.0.0813-1
Debian:13 vim 0 2:9.0.0813-1
SUSE:Enterprise Storage 6 vim 0 9.0.1040-150000.5.31.1
SUSE:Enterprise Storage 7 vim 0 9.0.1040-150000.5.31.1
SUSE:Enterprise Storage 7.1 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Micro 5.1 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Micro 5.2 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Micro 5.3 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Module for Basesystem 15 SP4 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Real Time 15 SP3 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Server 12 SP2-BCL vim 0 9.0.1234-17.12.1
SUSE:Linux Enterprise Server 12 SP4-LTSS vim 0 9.0.1234-17.12.1
SUSE:Linux Enterprise Server 12 SP5 vim 0 9.0.1234-17.12.1
SUSE:Linux Enterprise Server 15 SP1-LTSS vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Server 15 SP2-LTSS vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Server 15 SP3-LTSS vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 vim 0 9.0.1234-17.12.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 vim 0 9.0.1234-17.12.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 vim 0 9.0.1040-150000.5.31.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 vim 0 9.0.1040-150000.5.31.1
SUSE:Manager Proxy 4.1 vim 0 9.0.1040-150000.5.31.1
SUSE:Manager Proxy 4.2 vim 0 9.0.1040-150000.5.31.1
SUSE:Manager Retail Branch Server 4.1 vim 0 9.0.1040-150000.5.31.1
SUSE:Manager Retail Branch Server 4.2 vim 0 9.0.1040-150000.5.31.1
SUSE:Manager Server 4.1 vim 0 9.0.1040-150000.5.31.1
SUSE:Manager Server 4.2 vim 0 9.0.1040-150000.5.31.1
SUSE:OpenStack Cloud 9 vim 0 9.0.1234-17.12.1
SUSE:OpenStack Cloud Crowbar 9 vim 0 9.0.1234-17.12.1
Ubuntu:20.04:LTS vim 0 2:8.1.2269-1ubuntu5.18
Ubuntu:22.04:LTS vim 0 2:8.2.3995-1ubuntu2.12
Ubuntu:Pro:14.04:LTS vim 0 2:7.4.052-1ubuntu3.1+esm13
Ubuntu:Pro:18.04:LTS vim 0 2:8.0.1453-1ubuntu1.13+esm5
openSUSE:Leap 15.3 vim 0 9.0.1040-150000.5.31.1
openSUSE:Leap 15.4 vim 0 9.0.1040-150000.5.31.1
openSUSE:Leap Micro 5.2 vim 0 9.0.1040-150000.5.31.1
openSUSE:Leap Micro 5.3 vim 0 9.0.1040-150000.5.31.1

Related vulnerabilities