Cloudanix VulnDB

CVE-2022-1942

High · 7.8

CVSS

7.8

EPSS

1.6%

Published

May 31, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a common text editing tool could let attackers take over a computer simply by tricking someone into opening a specially made file.

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

A heap-based buffer overflow vulnerability that can lead to arbitrary code execution or application crashes when processing specially crafted input files.

Why it matters to the business

Attackers could gain control of developer workstations running the vulnerable editor, enabling data theft, persistence, or further network compromise; the issue affects a widely used tool with high ecosystem prevalence in software development environments.

How an attack unfolds

An attacker crafts a malicious file that triggers the heap overflow during parsing. When opened in the vulnerable editor, the overflow allows arbitrary code execution; public exploits exist and the flaw has been known for over four years with stable but non-zero exploit probability.

How to fix it

Upgrade vim/vim to the fixed commit 98056533b96b6b5d8849641de93185dd7bcadc44 or later; rebuild from source or obtain updated packages from distribution maintainers.

How to confirm the fix worked

Confirm the editor reports a version built from or after the listed commit; attempt to open known trigger files in an isolated environment to verify absence of crashes or unexpected behavior.

Typical attack path

  1. Craft a malicious input file exploiting the heap overflow
  2. Deliver the file to the target via email, download link, or repository
  3. Victim opens the file in the vulnerable editor
  4. Overflow triggers code execution on the local system

How to detect it

Review system logs and process creation events for unexpected editor crashes or child processes spawned immediately after file open operations; correlate with file access timestamps from untrusted sources.

What your security team should do

  • Immediately update all instances to the patched commit
  • Block or sandbox execution of untrusted files in the editor where possible
  • Monitor for any remaining vulnerable deployments across developer systems

The record

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

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 vim 0 2:8.1.0875-5+deb10u4
Debian:11 vim 0 No fix
Debian:11 vim 0 2:8.2.2434-3+deb11u2
Debian:12 vim 0 2:9.0.0135-1
Debian:13 vim 0 2:9.0.0135-1
Mageia:8 vim 0 8.2.5052-1.mga8
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+esm10
openSUSE:Tumbleweed vim 0 9.0.0453-2.1

Related vulnerabilities