Cloudanix VulnDB

CVE-2022-1735

High · 7.8

CVSS

7.8

EPSS

1.3%

Published

May 17, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

An old flaw in the Vim text editor lets attackers take over a computer if someone opens a specially made file, so updating Vim removes the danger.

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

Classic buffer overflow in Vim allows an attacker to overwrite adjacent memory when processing a specially crafted file, potentially leading to arbitrary code execution or application crash on the local system.

Why it matters to the business

Compromise of developer workstations could result in theft of source code, intellectual property, or credentials, along with potential lateral movement into build or deployment environments; the vulnerability has been public for over four years with publicly available exploits, increasing long-term risk for organizations still running older Vim versions.

How an attack unfolds

An attacker creates a malicious file that triggers the buffer overflow condition when opened in an affected Vim binary; the victim is tricked into opening the file (via email, download, or shared storage), causing the overflow to execute attacker-controlled code under the user's privileges.

How to fix it

Upgrade Vim to a build containing commit 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 (corresponding to version 8.2.4969 or later). Rebuild from source or install updated packages from distribution repositories. Disable modelines and avoid opening untrusted files until patched.

How to confirm the fix worked

Run 'vim --version' and confirm the version is 8.2.4969 or newer, or verify the presence of commit 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 in the source tree. Test with known proof-of-concept files in a sandbox to ensure no crash or unexpected behavior occurs.

Typical attack path

  1. Craft a file that exceeds internal buffer limits in Vim's file parsing routines
  2. Deliver the file to the target via phishing, repository, or file share
  3. Victim opens the file with an unpatched Vim binary
  4. Overflow overwrites memory to redirect execution to attacker payload
  5. Payload executes to establish persistence, exfiltrate data, or run further commands

How to detect it

Review process creation logs and command-line history for unexpected Vim invocations on files with unusual extensions or from temporary directories; monitor for child processes spawned by Vim that perform network activity or access credential stores.

What your security team should do

  • Immediately inventory all Vim installations and prioritize patching of developer and CI systems
  • Enforce use of distribution-managed Vim packages or verified builds rather than custom compilations
  • Add automated version checks to developer onboarding and CI pipelines
  • Educate users on risks of opening files from untrusted sources even in trusted editors

The record

Classic Buffer Overflow in GitHub repository vim/vim prior to 8.2.4969.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 vim 0 No fix
Debian:12 vim 0 2:9.0.0135-1
Debian:13 vim 0 2:9.0.0135-1
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.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 2:7.4.052-1ubuntu3.1+esm8
Ubuntu:Pro:16.04:LTS vim 0 2:7.4.1689-3ubuntu1.5+esm8
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