
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-28420 is a heap-based buffer overflow (write) and out-of-bounds read vulnerability in Vim's terminal emulator (:terminal) affecting all versions prior to 9.2.0076. The flaws exist in the handle_pushline() function in src/terminal.c when processing terminal cells containing maximum combining characters from Unicode supplementary planes. It was disclosed on February 27, 2026, by GitHub users ehdgks0627 and un3xploitable, with the fix released the same day as Vim v9.2.0076. The vulnerability carries a CVSS v3.1 base score of 4.4 (Medium) (GitHub Advisory, Openwall OSS-Sec).
The root cause involves two related flaws classified as CWE-122 (Heap-based Buffer Overflow) and CWE-125 (Out-of-bounds Read) in handle_pushline() within src/terminal.c. For the heap overflow: Vim allocates only 21 bytes (MB_MAXBYTES) per terminal cell via ga_grow(), assuming characters are within the Basic Multilingual Plane (BMP, max 3 bytes each). However, a cell can hold up to 6 characters from Unicode supplementary planes (4 bytes each), requiring 24 bytes — causing a 3-byte heap overflow during UTF-8 conversion. For the OOB read: the loop iterating over cell characters lacks a boundary check on the vterm_screen_cell_t.chars array; when a cell is fully populated, the loop reads index 6 of a 6-element (0–5) array. The fix changes the allocation to VTERM_MAX_CHARS_PER_CELL * 4 and adds an explicit loop boundary check (GitHub Advisory, Vim Commit).
Successful exploitation can cause Vim to crash (Denial of Service) or result in heap memory corruption, with low integrity and low availability impact and no confidentiality impact. An attacker who controls the output of a program running inside a Vim :terminal buffer — for example, a malicious script or binary executed within the terminal — can trigger the overflow. While the CVSS score reflects limited scope, heap corruption in theory could be leveraged for further memory exploitation depending on the runtime environment (GitHub Advisory, Openwall OSS-Sec).
:terminal feature enabled (compiled with +terminal).:terminal buffer and execute the malicious program within it (e.g., cat malicious_file.txt or running a crafted binary).handle_pushline() processes the terminal output, the insufficient buffer allocation (MB_MAXBYTES = 21 bytes instead of the required 24 bytes) causes a 3-byte heap overflow write, and the missing boundary check causes an out-of-bounds read on the vterm_screen_cell_t.chars array.:terminal feature with Unicode-heavy output.core, vim.core) generated by the Vim process; system logs (e.g., /var/log/syslog, journalctl) showing segfault entries for the vim binary.cat-ed or displayed inside a Vim terminal buffer.The primary remediation is to upgrade Vim to version 9.2.0076 or later, which fixes both the heap overflow and the OOB read in handle_pushline() (Vim Release). Linux distribution packages have been updated across Fedora, Ubuntu (USN-8101-1), Mageia (MGASA-2026-0049), Amazon Linux 2023 (ALAS2023-2026-1584), and Microsoft's CBL-Mariner/Azure Linux. As a workaround where patching is not immediately possible, avoid using Vim's :terminal feature with untrusted programs or files containing Unicode supplementary plane characters. Prioritize patching on shared development systems and environments where users routinely run external programs inside Vim terminal buffers (GitHub Advisory, Red Hat CVE).
The vulnerability was disclosed responsibly by GitHub users ehdgks0627 and un3xploitable directly to the Vim project, and Christian Brabandt (Vim maintainer) published the advisory and fix simultaneously on February 27, 2026, via the oss-security mailing list and GitHub Security Advisories. The moderate CVSS score and requirement for user interaction have kept community reaction measured, with coverage primarily limited to Linux distribution security advisories and vulnerability tracking platforms. No significant social media controversy or high-profile researcher commentary has been observed (Openwall OSS-Sec, GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."