CVE-2022-0318
NixOS vulnerability analysis and mitigation

Overview

A heap-based buffer overflow vulnerability was discovered in vim/vim prior to version 8.2. The vulnerability was identified with CVE-2022-0318 and was disclosed on January 21, 2022. The issue affects vim installations across multiple operating systems and distributions (NVD, Huntr).

Technical details

The vulnerability occurs due to reading beyond the end of a line in the utfheadoff function. The issue was fixed in vim version 8.2.4151 by modifying how block insert handles offsets for correcting length, specifically by only using the offset for correcting the length in block insert operations. The vulnerability received a CVSS v3.1 base score of 9.8 (CRITICAL) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD, GitHub Patch).

Impact

The successful exploitation of this vulnerability could lead to arbitrary code execution, information disclosure, or denial of service. The heap-based buffer overflow could allow attackers to execute malicious code, modify memory contents, or crash the application (Debian).

Mitigation and workarounds

The primary mitigation is to upgrade vim to version 8.2.4151 or later which contains the security fix. Multiple distributions have released patched versions including Debian (2:8.1.0875-5+deb10u4), Ubuntu, and Gentoo. For systems that cannot be immediately updated, there are no known workarounds available (Debian, Gentoo).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-14330CRITICAL9.8
  • NixOSNixOS
  • rhel10::firefox-flatpak
NoYesDec 09, 2025
CVE-2025-14329HIGH8.8
  • NixOSNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesDec 09, 2025
CVE-2025-14333HIGH8.1
  • NixOSNixOS
  • firefox
NoYesDec 09, 2025
CVE-2025-14332HIGH7.3
  • NixOSNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesDec 09, 2025
CVE-2025-14331MEDIUM6.5
  • NixOSNixOS
  • rhel10::thunderbird-flatpak
NoYesDec 09, 2025

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