Read the docs

Command injection in Vim sign_jump() via unescaped buffer names

Priority LOW 38CWE-88Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Code execution
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-88.

Summary

Vim before 9.2.1090 is affected. When a sign jump opens a buffer that is not shown in any window, sign_jump() builds an Ex command line from the buffer's file name without escaping it (CWE-88), so a name containing | runs a second command. A user who places a sign in a buffer with such a name and runs :sign jump or sign_jump() on it executes arbitrary Ex commands, including shell commands, with the privileges of the user running Vim.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

Description from the GitHub advisory

Ex Command Injection via Unescaped Buffer Name in sign_jump() in Vim < v9.2.1090 ======================================================= Date: 12.09.2026 Severity: Low CVE: *requested, not yet assigned* CWE: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88), Improper Control of Generation of Code ('Code Injection') (CWE-94) ## Summary When jumping to a sign in a buffer that is not displayed in any window, Vim re-opens that buffer by building an Ex command line from the buffer's file name and executing it. The file name is interpolated without escaping, so a name containing the Ex command separator `|` is split into two commands, the second of which is taken from the file name. ## Description `sign_jump()` in `src/sign.c` handles the case where the buffer holding the sign is not shown in any window: ```c char_u *cmd = alloc(STRLEN(buf->b_fname) + 25); if (cmd == NULL) return -1; sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname); do_cmdline_cmd(cmd); ``` `buf->b_fname` is stored as given and is not escaped via `fnameescape()`. Unix permits `|` in a file name, and `do_cmdline_cmd()` treats it as a command separator, so a buffer named `pwn|:silent !cmd` results in two Ex commands being executed: the `:edit`, which fails, and whatever follows the bar. The branch is reached only when the buffer is not displayed in any window, that is when `buf_jump_open_win()` returns NULL. It is used by the `:sign jump` command and by the `sign_jump()` function. The issue has been addressed by opening the buffer by its number with `do_ecmd()` instead of synthesizing a command line, so that no escaping is required. ## Impact Arbitrary Ex command execution, and through commands such as `:!` arbitrary operating system command execution, in the context of the user running Vim. Vim must be built with `+signs`, which is the default in normal builds. The severity is rated Low. Execution requires a buffer whose name contains `|` or a newline, a sign placed in that buffer, the buffer not being shown in any window, and `:sign jump` or `sign_jump()` being invoked on it. These are deliberate steps by the user rather than a consequence of opening a file, and the commands run with no privilege beyond the user's own account. ## Acknowledgements The Vim project would like to thank Ahmed Ibrahim (@skeletonsec) for reporting the issue. ## References The issue has been fixed as of Vim patch [v9.2.1090](https://github.com/vim/vim/releases/tag/v9.2.1090). - [Commit](https://github.com/vim/vim/commit/2942c934ec7c68791b9da7ab6c29ae4987f7a2fb) - [Github Security Advisory](https://github.com/vim/vim/security/advisories/GHSA-x9jf-rjm6-vxqh)

Why it matters now

Fix Fixed Vim (vim): v9.2.1090

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—Vim (vim)< 9.2.1090v9.2.1090Patch availableGHSA-x9jf-rjm6-vxqh
  • Vim (vim) Vendor— Affected < 9.2.1090 Fixed in v9.2.1090 Patch available GHSA-x9jf-rjm6-vxqh

Remediation

Upgrade to Vim v9.2.1090, which fixes the issue.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

  • Fix · GHSA-x9jf-rjm6-vxqh Vim (vim) Fixed in v9.2.1090 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-x9jf-rjm6-vxqh

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences