Skip to content
Vulnerability Misconfiguration

Vim on Windows runs executables from current directory via job_start() and system()

Vim before 9.2.1421 on Windows may execute a program from the current directory instead of the intended system program.

Reported by oss-security

First reported Summary updated

Read the coverage
Public PoC
Not known
Exploited
Not known
Severity
Not rated

What happened

Vim on Windows can execute a program from the current directory rather than the intended system program when a script or plugin starts it using job_start(), term_start() or system() with a List argument.1

The issue is a follow-up to GHSA-g77q-xrww-p834, which was fixed by setting an environment variable for shell-based commands, but direct CreateProcessW() calls did not have that variable set.1

An attacker could place a trojanized executable with a common name in a project folder, which would run when a plugin starts that program by name.1

Who is affected

  • Vim, before 9.2.14211

Is there a public exploit?

Not known None of the sources mentions public exploit code yet.

Exploited in the wild?

Not known None of the sources reports attacks using it so far.

What to do

  • Update to Vim patch v9.2.1421 or later.1

For bug hunters

This is an uncontrolled search path element (CWE-427) where an application loads an executable from the current working directory before trusted locations. Such flaws appear in desktop applications, installers, and developer tools that spawn external programs by name. Test by placing a harmless executable with a common name in a project directory and triggering features that launch external tools. Look for any program invocation that does not use an absolute path or a trusted search order.

What to test

  • Place a benign executable named like a common tool in a project folder and trigger plugin features that start external programs.
  • Check whether the application sets NoDefaultCurrentDirectoryInExePath or equivalent before spawning processes.
  • Test job_start(), term_start(), and system() with List arguments from a directory containing a trojanized executable.
  • Verify that external programs are launched by absolute path or from trusted directories only.

The Misconfiguration lesson Every Misconfiguration report

Written by bugbounty.wiki with AI from its source. Every statement above comes with a quote we checked against the source it cites (the numbers link to it); anything we could not check was left out. It can still be wrong, so read the coverage before relying on a detail.

Coverage

The article this story is based on. Each headline opens the outlet's own article.

  1. 1

    oss-security

    [vim-security] Windows: job_start() and system() run executables from cwd in Vim < 9.2.1421
    “On Windows, Vim may execute a program from the current directory instead of the intended system program, when a script or plugin starts it using…”

Reports about Misconfiguration

View all

Disclosed reports of the same bug class, clearest first.

More news

View all

Other stories from the last month, Misconfiguration first.