CVE-2026-26269
Stack Buffer Overflow in Vim NetBeans Integration (Pre
Publication date: 2026-02-13
Last updated on: 2026-02-18
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| vim | vim | to 9.1.2148 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-121 | A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': "CVE-2026-26269 is a medium-severity stack-based buffer overflow vulnerability in Vim's NetBeans integration affecting versions prior to 9.1.2148."}, {'type': 'paragraph', 'content': 'The flaw exists in the function special_keys() located in src/netbeans.c, where a fixed-size 64-byte stack buffer (keybuf) is used without bounds checking.'}, {'type': 'paragraph', 'content': "Specifically, the while (*tok) loop writes two bytes per iteration into keybuf based on tokens received from a NetBeans server's specialKeys command. If the server sends a crafted token string longer than 32 characters, it causes a buffer overflow by writing beyond the 64-byte buffer, corrupting adjacent stack data including cmdbuf[256] and potentially the return address."}, {'type': 'paragraph', 'content': 'The vulnerability is triggered when Vim is started with NetBeans integration enabled (e.g., using the -nb option) and connects to a NetBeans server that sends a malicious specialKeys command.'}, {'type': 'paragraph', 'content': 'The NetBeans protocol communicates over unencrypted TCP, allowing a Man-in-the-Middle (MITM) attacker to inject malicious payloads into an active session.'}, {'type': 'paragraph', 'content': 'Exploitation requires user interaction to connect to the malicious server.'}] [1, 3]
How can this vulnerability impact me? :
This vulnerability can impact you by allowing a remote attacker controlling or intercepting the NetBeans server connection to crash the Vim editor or potentially execute arbitrary code.
The buffer overflow can corrupt adjacent stack data including the return address, which can lead to control flow hijacking.
The immediate impact includes denial of service via a Vim process crash.
More severe impact could include arbitrary code execution if the attacker successfully exploits the overflow to overwrite the return address.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring Vim instances that are started with NetBeans integration enabled (e.g., using the -nb option) and observing if they connect to a NetBeans server sending specially crafted specialKeys commands longer than 32 characters.
Detection can also be performed by using AddressSanitizer (ASAN) or similar memory error detection tools when running Vim with NetBeans integration enabled, as ASAN can detect stack-buffer-overflow errors triggered by malicious input.
Since the NetBeans protocol communicates over unencrypted TCP, network monitoring tools can be used to inspect traffic on the NetBeans port for unusually long specialKeys commands or suspicious payloads.
No specific commands are provided in the resources, but general approaches include:
- Run Vim with AddressSanitizer enabled to detect buffer overflows during testing.
- Use network packet capture tools (e.g., tcpdump, Wireshark) to monitor NetBeans TCP traffic for suspiciously long specialKeys commands.
- Check running Vim processes for the use of the -nb option indicating NetBeans integration is enabled.
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to upgrade Vim to version 9.1.2148 or later, where the vulnerability has been fixed by adding proper bounds checking in the special_keys() function.
If upgrading immediately is not possible, avoid using Vim with NetBeans integration enabled (do not start Vim with the -nb option) to prevent exposure to malicious specialKeys commands.
Additionally, restrict or monitor network access to the NetBeans TCP port to prevent connections from untrusted or potentially malicious NetBeans servers.
Consider using network security measures such as firewalls or intrusion detection systems to detect and block suspicious NetBeans protocol traffic.