/

CVE-2026-46709

Severity:

HIGH RISK

(7.8)

Command Injection (CWE-78) via Path Drop in Tabby Terminal

CVE-2026-46709

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-77, CWE-78

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Tabby terminal before version 1.0.234 unsafely injects dropped file paths into the active shell without sanitizing command substitution characters.

An attacker who can trick a user into dropping a crafted filename into a Tabby session may achieve arbitrary command execution when the victim presses Enter.

Affected context

The vulnerability occurs in Tabby (formerly Terminus) terminal emulator when handling drag-and-drop of files into an active terminal session.

When a user drags a file with a specially crafted name onto the Tabby window, the application inserts that path directly into the shell input line.

In affected versions, characters used for command substitution such as $(...) and backticks are not neutralized, so the shell interprets them as part of a command rather than as a literal path.

The risk is present primarily in interactive sessions where users frequently drag and drop files into the terminal for convenience.

Exploit preconditions

  • Attack surface: Local desktop environment via Tabby's drag-and-drop file path handling.
  • Required access: Ability to influence or control the filenames a Tabby user might drag into the terminal (e.g., shared folders, downloads, archives, or links to maliciously named files).
  • Trigger point: The victim drags a maliciously named file into an active Tabby shell and then presses Enter, causing the inserted text to be executed by the shell.
  • Why exploitation is possible: Tabby passes dropped file paths directly to the shell without escaping or neutralizing command substitution metacharacters, allowing the shell to interpret parts of the filename as executable syntax.

Why this happens

This issue stems from treating externally influenced text as trusted shell input without proper escaping.

The pathDrop handling code constructs a shell command line by interpolating the dropped file path verbatim, failing to sanitize or quote characters that have special meaning in shells (such as $, backticks, and command substitution syntax).

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), and is closely related to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').

Conceptually, any UI feature that bridges user-controlled data (filenames, clipboard contents, drag-and-drop payloads) into a command interpreter must enforce strict neutralization or literalization of special characters; failing to do so exposes the shell as an unintended execution engine.

Potential impact

  • Execution of arbitrary shell commands under the privileges of the Tabby user.
  • Exfiltration, modification, or deletion of files accessible to the user account.
  • Installation of additional malware or persistence mechanisms on the user's system.
  • Lateral movement within the user's environment (e.g., accessing SSH keys or remote systems).
  • Compromise of sensitive credentials stored in configuration files or environment variables.

General mitigation guidance

Effective mitigation centers on treating all path-like inputs as data and not as shell syntax.

Common defensive patterns include:

  • Wrapping dropped file paths in strict, language-appropriate quoting or using APIs that pass arguments as arrays instead of interpolated command strings.
  • Explicitly escaping or neutralizing shell metacharacters (e.g., $, backticks, ;, &, pipes, parentheses) when constructing command lines.
  • Designing the drag-and-drop behavior so that file paths are inserted as literal text into the terminal UI, without any additional shell-specific decoration or expansion.
  • Applying the principle of least surprise: avoid automatically executing or preparing dropped content in a way that changes its meaning in the shell.
  • Using secure-by-default utility functions or libraries for command construction rather than crafting shell strings manually.

How teams detect issues like this

Detection typically involves reviewing how the application builds and forwards shell input:

  • Static analysis: Search for code paths that concatenate or interpolate user-controlled values (such as filenames, drag-and-drop payloads, clipboard content) into shell command strings or terminal input without quoting or escaping.
  • Code review: Examine UI interaction handlers (e.g., drag-and-drop, copy/paste, context menus) to ensure they treat external data as literal and do not rely on shell parsing semantics.
  • Policy enforcement: Establish coding guidelines that forbid direct string-based command construction when user-controlled input is involved, and require use of safe wrappers or argument-array APIs.
  • Automated tooling: Integrate linters or security scanners that flag dangerous patterns like unescaped insertion of external data into shell commands or terminal buffers.

Sources

SourceLink
github.comgithub.com/Eugeny/tabby/commit/e151472b951bbd472ddc0545ec8656e4c0f352da
github.comgithub.com/Eugeny/tabby/releases/tag/v1.0.234
github.comgithub.com/Eugeny/tabby/security/advisories/GHSA-mq9v-2pgm-fxgh

Frequently asked

questions

Exploitation is local but impactful: an attacker must influence the filenames a Tabby user drags into the terminal, or convince the user to handle a maliciously named file, after which pressing Enter in the affected terminal can execute attacker-controlled commands.

Direct local access to the victim's desktop is not strictly required; however, the attacker must be able to deliver a file with a crafted name (for example via downloads, shared drives, or archives) and prompt the victim to drag it into a Tabby session.

Always treat dropped file paths and other UI-originated text as data, not code: pass them as literal arguments to the shell or underlying APIs, apply strict quoting and escaping, and avoid constructing raw command lines from user-controlled values.

Adopt a defensive design approach where any bridge between user-controlled input and interpreters (shells, SQL engines, template engines) uses parameterization, sanitization, and safe APIs, backed by code review checklists and automated scans that flag potential injection points.

Find out what's already
exploitable in your codebase.