Cloudanix VulnDB

CVE-2022-0261

High · 7.8

CVSS

7.8

EPSS

1.7%

Published

Jan 18, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Vim text editor could let someone take over your computer if you open a specially made file with an old version.

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

What it actually does

Heap-based buffer overflow in Vim allowing memory corruption that can result in arbitrary code execution or application crash when processing specially crafted input.

Why it matters to the business

Attackers could gain full control of developer or administrator workstations running vulnerable Vim versions, potentially leading to source code theft, supply-chain compromise, or lateral movement with moderate urgency given stable low exploitation probability.

How an attack unfolds

An attacker creates a malicious file containing input that triggers the heap overflow in Vim's parsing routines; when a user opens the file with a vulnerable Vim binary the overflow corrupts memory allowing the attacker to execute arbitrary code in the context of the Vim process.

How to fix it

Upgrade vim/vim to commit 98056533b96b6b5d8849641de93185dd7bcadc44 or later; rebuild from the fixed source and replace all installed binaries; avoid opening untrusted files with older Vim versions until patched.

How to confirm the fix worked

Run 'vim --version' and confirm the build includes commit 98056533b96b6b5d8849641de93185dd7bcadc44 or a later release; attempt to open known triggering test cases in a controlled environment and verify no crash or unexpected behavior occurs.

Typical attack path

  1. Craft malicious input file that overflows a heap buffer in Vim
  2. Deliver the file to the target via email, download, or repository
  3. Victim opens the file using a vulnerable Vim binary
  4. Overflow corrupts memory enabling code execution or crash
  5. Attacker payload executes in the Vim process context

How to detect it

Review system logs and process execution history for unexpected Vim crashes or abnormal memory usage when opening files; inspect command history and file access logs for suspicious files opened shortly before anomalous activity; search for Vim processes spawning unexpected child processes or network connections.

What your security team should do

  • Immediately update all Vim installations to the fixed commit across developer and server environments
  • Block or sandbox opening of untrusted files with Vim until patches are deployed
  • Monitor for new public exploits given the existing proof-of-concept availability
  • Add Vim version checks to configuration management and CI pipelines

The record

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

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 vim-X11 0 2:8.0.1763-16.el8_5.12
AlmaLinux:8 vim-X11 0 2:8.0.1763-16.el8_5.13
AlmaLinux:8 vim-common 0 2:8.0.1763-16.el8_5.12
AlmaLinux:8 vim-common 0 2:8.0.1763-16.el8_5.13
AlmaLinux:8 vim-enhanced 0 2:8.0.1763-16.el8_5.12
AlmaLinux:8 vim-enhanced 0 2:8.0.1763-16.el8_5.13
AlmaLinux:8 vim-filesystem 0 2:8.0.1763-16.el8_5.12
AlmaLinux:8 vim-filesystem 0 2:8.0.1763-16.el8_5.13
AlmaLinux:8 vim-minimal 0 2:8.0.1763-16.el8_5.13
Debian:10 vim 0 2:8.1.0875-5+deb10u3
Debian:11 vim 0 No fix
Debian:11 vim 0 2:8.2.2434-3+deb11u2
Debian:12 vim 0 2:8.2.4659-1
Debian:13 vim 0 2:8.2.4659-1
Debian:9 vim 0 2:8.0.0197-4+deb9u6
Mageia:8 vim 0 8.2.4975-1.mga8
Red Hat:enterprise_linux:8::appstream vim 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-X11 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-X11-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-common 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-common-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-debugsource 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-enhanced 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-enhanced-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-filesystem 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-minimal 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::appstream vim-minimal-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-X11 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-X11-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-common 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-common-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-debugsource 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-enhanced 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-enhanced-debuginfo 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-filesystem 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-minimal 0 2:8.0.1763-16.el8_5.12
Red Hat:enterprise_linux:8::baseos vim-minimal-debuginfo 0 2:8.0.1763-16.el8_5.12
Rocky Linux:8 vim 0 2:8.0.1763-16.el8_5.12
SUSE:Enterprise Storage 6 vim 0 8.2.5038-150000.5.21.1
SUSE:Enterprise Storage 7 vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise High Performance Computing 15-ESPOS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise High Performance Computing 15-LTSS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Micro 5.1 vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Micro 5.2 vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Module for Basesystem 15 SP4 vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Module for Desktop Applications 15 SP3 vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 vim 0 8.2.5038-150000.5.21.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 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Server 15 SP1-LTSS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Server 15 SP2-BCL vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Server 15 SP2-LTSS vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Server 15-LTSS vim 0 8.2.5038-150000.5.21.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 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 vim 0 8.2.5038-150000.5.21.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 vim 0 8.2.5038-150000.5.21.1
SUSE:Manager Proxy 4.1 vim 0 8.2.5038-150000.5.21.1
SUSE:Manager Retail Branch Server 4.1 vim 0 8.2.5038-150000.5.21.1
SUSE:Manager Server 4.1 vim 0 8.2.5038-150000.5.21.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 No fix
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+esm4
openSUSE:Leap 15.3 vim 0 8.2.5038-150000.5.21.1
openSUSE:Leap 15.4 vim 0 8.2.5038-150000.5.21.1
openSUSE:Tumbleweed vim 0 9.0.0453-2.1

Related vulnerabilities