CVE-2026-28422 in viminfo

Summary

by MITRE • 02/28/2026

Vim is an open source, command line text editor. Prior to version 9.2.0078, a stack-buffer-overflow occurs in `build_stl_str_hl()` when rendering a statusline with a multi-byte fill character on a very wide terminal. Version 9.2.0078 patches the issue.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 04/16/2026

The vulnerability identified as CVE-2026-28422 represents a critical stack buffer overflow condition affecting the Vim text editor across versions prior to 9.2.0078. This flaw manifests specifically within the `build_stl_str_hl()` function during statusline rendering operations when processing multi-byte fill characters on exceptionally wide terminal displays. The vulnerability stems from inadequate bounds checking in memory allocation calculations for statusline string construction, creating a scenario where attacker-controlled input data can overwrite adjacent stack memory regions. The issue occurs when Vim attempts to render statuslines with multi-byte characters such as unicode symbols or extended ascii sequences on terminals exceeding normal width parameters, typically those with hundreds or thousands of columns.

The technical exploitation of this vulnerability involves triggering the `build_stl_str_hl()` function through specific terminal configuration settings combined with multi-byte character sequences in statusline definitions. When Vim processes these conditions, the buffer overflow occurs due to improper calculation of required memory space for the statusline string, leading to stack corruption that can potentially allow arbitrary code execution. The vulnerability aligns with CWE-121 Stack-based Buffer Overflow, which describes buffer overflows where data written to a stack buffer exceeds the buffer's allocated size, and may also relate to CWE-787 Out-of-bounds Write when the overflow extends beyond the intended buffer boundaries. The attack surface is particularly relevant in environments where Vim is used with custom terminal configurations or when users interact with multi-language text content containing extended character sets.

Operational impact of this vulnerability extends beyond simple denial of service scenarios to potentially enable remote code execution or privilege escalation depending on the execution environment. Systems running affected Vim versions may become vulnerable when users open files with specific statusline configurations or when Vim is invoked with particular terminal width parameters. The vulnerability is particularly concerning in server environments or automated systems where Vim might be used in scripts or automated workflows, as these scenarios could provide attackers with opportunities to exploit the overflow through crafted input files or terminal configurations. Security analysts should note that the vulnerability's exploitation requires specific conditions including wide terminal displays and multi-byte character usage, but the potential for remote code execution makes it a significant concern for system administrators managing multiple user environments.

Mitigation strategies for CVE-2026-28422 focus primarily on upgrading to Vim version 9.2.0078 or later, which contains the necessary patches addressing the buffer overflow condition. System administrators should prioritize updating all Vim installations across their infrastructure, particularly in environments where users may have elevated privileges or where Vim is used in automated processes. Additional defensive measures include implementing terminal width restrictions in shell configurations to prevent excessive width scenarios, monitoring for unusual statusline configurations in user files, and conducting security audits of Vim usage patterns within the organization. The fix implemented in version 9.2.0078 demonstrates proper bounds checking and memory management practices that prevent the overflow condition from occurring, aligning with ATT&CK technique T1059.006 Command and Scripting Interpreter: Unix Shell where such vulnerabilities could be exploited through shell command injection. Organizations should also consider implementing application whitelisting policies for Vim installations and monitoring for suspicious file modifications that might attempt to exploit this vulnerability through configuration files or startup scripts.

Responsible

GitHub M

Reservation

02/27/2026

Disclosure

02/28/2026

Moderation

accepted

CPE

ready

EPSS

0.00142

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!