CVE-2022-1851
NixOS vulnerability analysis and mitigation

Overview

CVE-2022-1851 is an out-of-bounds read vulnerability discovered in the Vim text editor prior to version 8.2. The vulnerability was identified in the gchar_cursor() function in misc1.c and was fixed in patch 8.2.5013 (VIM Commit). The issue affects multiple versions of Vim across various operating systems and distributions (Debian LTS, Ubuntu Security).

Technical details

The vulnerability is characterized by an out-of-bounds read condition that occurs when the cursor position becomes invalid after text formatting operations. The issue was addressed by implementing a fix that corrects the cursor position after formatting operations through the addition of a check_cursor() function call (VIM Commit). The vulnerability has been assigned a CVSS 3.1 score of 7.8 (High), with attack vector being Local, attack complexity Low, and requiring user interaction (Ubuntu Security).

Impact

If exploited, this vulnerability could lead to a denial-of-service condition through application crash or potentially allow arbitrary code execution when processing specially crafted files. The vulnerability affects multiple operating systems and distributions including Ubuntu, Debian, and Fedora (Debian LTS, Fedora Update).

Exploitability

The vulnerability requires local access and user interaction to be exploited. An attacker would need to trick a user into opening a specially crafted file to trigger the vulnerability (Ubuntu Security).

Mitigation and workarounds

The vulnerability has been fixed in Vim version 8.2.5013 and later. Users are advised to upgrade to the patched versions available through their respective distribution channels. Multiple distributions have released security updates: Ubuntu has fixed versions for multiple releases, Debian has addressed it in version 2:8.0.0197-4+deb9u7 for Stretch and 2:8.1.0875-5+deb10u3 for Buster, and Fedora has released version 8.2.5046-1 (Debian LTS, Ubuntu Security, Fedora Update).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Alpine

Fixed

edge

vim: 8.2.5055-r0

Fixed

v3.18

vim: 8.2.5055-r0

Fixed

v3.19

vim: 8.2.5055-r0

Fixed

v3.20

vim: 8.2.5055-r0

Fixed

v3.21

vim: 8.2.5055-r0

Fixed

v3.22

vim: 8.2.5055-r0

Fixed

v3.23

vim: 8.2.5055-r0

Fixed

SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-70469HIGH7.5
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesSep 16, 2026
CVE-2026-87976HIGH7.2
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesSep 16, 2026
CVE-2026-82561MEDIUM5.9
  • NixOS logoNixOS
  • apache-nifi
NoYesSep 16, 2026
CVE-2026-86089LOW2.3
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesSep 16, 2026
CVE-2026-81866LOW0.5
  • NixOS logoNixOS
  • apache-nifi
NoYesSep 16, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management