CVE-2021-3778
NixOS vulnerability analysis and mitigation

Overview

A heap-based buffer overflow vulnerability (CVE-2021-3778) was discovered in Vim text editor. The vulnerability affects Vim versions prior to 8.2.3409 and was disclosed in September 2021. The issue specifically occurs in the utf_ptr2char() function when handling invalid UTF-8 characters (OSS Security, Red Hat CVE).

Technical details

The vulnerability exists in the regexp_nfa.c file where a heap-based buffer overflow can occur when processing invalid UTF-8 characters. The issue can be triggered when Vim is built with specific configurations (--with-features=huge --enable-gui=none) and address sanitizer. The vulnerability was assigned a CVSS score of 7.8 (HIGH) with the vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (NetApp Security).

Impact

Successful exploitation of this vulnerability could lead to disclosure of sensitive information, addition or modification of data, or Denial of Service (DoS). The severity of the impact is particularly concerning when Vim is configured to run with elevated privileges for editing system or application configuration files (OSS Security, NetApp Security).

Mitigation and workarounds

The vulnerability was fixed in Vim version 8.2.3409 with patch 8.2.3409 that addresses the reading beyond end of line issue with invalid UTF-8 characters. Users are advised to upgrade to this version or later. Multiple Linux distributions have released security updates to address this vulnerability, including Fedora, Debian, and Red Hat (GitHub Commit, Debian LTS).

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-68120MEDIUM5.4
  • NixOSNixOS
  • go
NoYesDec 30, 2025
CVE-2025-69413MEDIUM5.3
  • NixOSNixOS
  • code.gitea.io/gitea
NoYesJan 01, 2026
CVE-2025-15412MEDIUM4.8
  • NixOSNixOS
  • wabt
NoNoJan 01, 2026
CVE-2025-15411MEDIUM4.8
  • NixOSNixOS
  • wabt
NoNoJan 01, 2026
CVE-2025-68932LOW2.9
  • NixOSNixOS
  • freshrss
NoYesDec 27, 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