CVE-2026-25749

Heap Overflow in Vim

Published Feb 6, 2026 CVSS 3.1 · 6.6 Medium EPSS < 1% KEV · Not listed
Description
Vim is an open source, command line text editor. Prior to version 9.1.2132, a heap buffer overflow vulnerability exists in Vim's tag file resolution logic when processing the 'helpfile' option. The vulnerability is located in the get_tagfname() function in src/tag.c. When processing help file tags, Vim copies the user-controlled 'helpfile' option value into a fixed-size heap buffer of MAXPATHL + 1 bytes (typically 4097 bytes) using an unsafe STRCPY() operation without any bounds checking. This issue has been patched in version 9.1.2132.

Analysis

AI-generated

Technical impact

A heap buffer overflow exists in Vim’s tag file resolution logic when processing the ‘helpfile’ option. The vulnerable get_tagfname() function copies the user-controlled helpfile value into a fixed-size heap buffer using an unsafe STRCPY() operation without bounds checking, which can corrupt memory and potentially allow an attacker to execute arbitrary code or crash the editor. The flaw arises when Vim parses help file tags.

Affected Systems

Vim version 9.1.2131 and earlier are affected. The software is an open‑source command line text editor widely used on Linux, macOS, and Windows, and the vulnerability concerns the handling of the helpfile option for tag resolution.

Risk and Exploitability

The CVSS base score is 6.6, indicating medium severity, and the EPSS score is <1%, reflecting a very low likelihood of exploitation in the wild. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is local or remote configuration of the helpfile option, which an attacker could influence through environment settings or configuration files. Because a heap buffer overflow can lead to code execution, the potential impact is high should exploitation succeed.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Vim to version 9.1.2132 or newer, which includes the patch for the heap overflow bug.
  • If an immediate update is not feasible, configure Vim to use a safe or empty 'helpfile' value or disable the helpfile option entirely to reduce risk.
  • Limit write access to configuration files and environment variables that set the 'helpfile' option so that only trusted administrators can influence this value.

Generated by OpenCVE AI on April 18, 2026 at 13:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8101-1 Vim vulnerabilities
History
Type Values Removed Values Added
First Time appeared Neovim
Neovim neovim
CPEs cpe:2.3:a:neovim:neovim:*:*:*:*:*:*:*:*
Vendors & Products Neovim
Neovim neovim
Type Values Removed Values Added
CPEs cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Vim
Vim vim
Vendors & Products Vim
Vim vim
Type Values Removed Values Added
Description Vim is an open source, command line text editor. Prior to version 9.1.2132, a heap buffer overflow vulnerability exists in Vim's tag file resolution logic when processing the 'helpfile' option. The vulnerability is located in the get_tagfname() function in src/tag.c. When processing help file tags, Vim copies the user-controlled 'helpfile' option value into a fixed-size heap buffer of MAXPATHL + 1 bytes (typically 4097 bytes) using an unsafe STRCPY() operation without any bounds checking. This issue has been patched in version 9.1.2132.
Title Heap Overflow in Vim
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 6.6, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H'}

Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

  • CWE-122

    Heap-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 9, 2026, 3:26 PM
Reserved
Feb 5, 2026, 6:35 PM
Status
Analyzed
Published
Feb 6, 2026, 11:15 PM
Modified
Jun 17, 2026, 10:25 AM
Severity
Moderate
Public date
Feb 6, 2026, 10:43 PM