CVE-2022-0158
NixOS vulnerability analysis and mitigation

Overview

Vim was found to be vulnerable to a Heap-based Buffer Overflow vulnerability, identified as CVE-2022-0158. The vulnerability was discovered in early 2022 and affected the compilegetenv() function in the Vim text editor (CVE Mitre, NVD).

Technical details

The vulnerability exists in the compilegetenv() function where a heap-based buffer overflow could occur when reading before the start of the line with "$" by itself. The issue was fixed in Vim version 8.2.4049 by modifying how error reporting is handled - specifically by removing the subtraction of one when reporting the error (GitHub Commit).

Impact

The vulnerability could potentially lead to denial of service or arbitrary code execution when processing maliciously crafted input (Debian Tracker, Ubuntu Security).

Mitigation and workarounds

The vulnerability was patched in Vim version 8.2.4049. Users are advised to upgrade to this version or later. Multiple distributions have released security updates including Fedora (vim-8.2.4068-1.fc34), Ubuntu, and Apple macOS (Fedora Update, Apple Security).

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-48606HIGH7.8
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48639HIGH7.3
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48625HIGH7
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48608MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48569MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 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