/

CVE-2026-44465

Severity:

HIGH RISK

(8.6)

Command Injection in Zed IDE Project Opening

CVE-2026-44465

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution on developer workstation when opening a malicious project

Severity:

HIGH RISK

(8.6)

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

Zed IDE can be tricked into executing arbitrary system commands when a user opens a folder containing a malicious .git/config that abuses the core.fsmonitor Git configuration option.

An attacker who can convince a victim to open a crafted project directory in untrusted mode may achieve remote code execution on the victim's machine through this configuration-based command execution vector.

Affected context

The vulnerability occurs when Zed IDE interacts with Git repositories embedded in folders opened as projects.

It specifically affects workflows where:

  • The folder contains a .git directory with a controlled .git/config
  • Zed uses Git features that honor the core.fsmonitor configuration
  • The user opens an untrusted or externally supplied project folder (e.g., from a zip, cloned repo, sample project, or shared archive)

The risk is highest when users routinely open repositories from untrusted or semi-trusted sources without inspecting their Git configuration.

Exploit preconditions

  • Attack surface: Local desktop environment via Zed IDE project-opening functionality.
  • Required attacker capability: Ability to provide or influence a directory the victim will open in Zed (e.g., malicious repository or project archive) and control its .git/config.
  • Trigger point: The victim opens the malicious folder in Zed; Git-related operations that respect core.fsmonitor are invoked.
  • Why exploitation is possible: Zed implicitly trusts and executes behavior derived from Git configuration (core.fsmonitor) without sufficiently constraining or sanitizing the commands or programs associated with that option, enabling command execution defined by the attacker-controlled .git/config.

Why this happens

The underlying issue stems from treating repository-local Git configuration as trusted execution configuration inside the IDE environment.

The core.fsmonitor Git option allows specifying a helper program for filesystem monitoring, and Zed's integration with Git fails to isolate or constrain this helper when it is defined in an attacker-controlled .git/config.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), because data from a configuration file effectively controls what command or executable is run, with insufficient validation, sandboxing, or separation of code and configuration.

Potential impact

  • Execution of arbitrary commands under the context of the user running Zed
  • Installation of malware, backdoors, or persistence mechanisms on the developer's workstation
  • Exfiltration of source code, SSH keys, tokens, and other sensitive development credentials
  • Lateral movement within the developer's environment or connected infrastructure
  • Tampering with checked-out source code to plant supply-chain compromises

General mitigation guidance

Effective mitigation focuses on treating Git configuration as untrusted input when opening unknown projects and constraining any execution paths it can influence.

General defensive patterns include:

  • Decouple configuration from execution: Avoid directly executing or honoring helper programs specified in local Git configuration when operating in "untrusted project" contexts.
  • Restrict dangerous options: Maintain an explicit denylist or safelist for Git config keys that can trigger process execution (e.g., core.fsmonitor, hooks, helper commands) when working with untrusted repositories.
  • Sandbox external helpers: Where helper programs must be used, execute them in a heavily sandboxed or brokered environment with limited permissions and no access to arbitrary system resources.
  • Apply least privilege: Run IDE-related helper processes with minimal privileges and privileges separated from the user's broader environment where feasible.
  • Expose security modes to users: Provide clear "untrusted folder" semantics where all configuration-driven execution paths are disabled or heavily constrained by default.

How teams detect issues like this

Several approaches can help organizations and projects detect similar vulnerabilities:

  • Code review focus: Inspect IDE–Git integration code for places where Git configuration values influence process execution, command-line construction, or environment setup.
  • Static analysis patterns: Use tools or custom rules to flag code that:
  • Spawns subprocesses based on configuration or repository contents
  • Builds shell commands or command-line arguments from unvalidated strings
  • Invokes Git helpers without checking trust level of the repository
  • Policy enforcement: Introduce architectural rules that forbid direct execution of commands defined in repository-local configuration for untrusted workspaces; enforce these via automated checks in CI for IDE extensions or integrations.
  • Security testing: Include test repositories with malicious .git/config entries in security regression suites to ensure that opening them in the IDE does not produce code execution.

Sources

SourceLink
github.comgithub.com/zed-industries/zed/security/advisories/GHSA-fj2r-rmw6-h222

Frequently asked

questions

Not directly in the traditional server sense. Exploitation requires the victim to open a malicious folder or repository in Zed. However, an attacker can deliver such a project over the network (e.g., via download link, email attachment, or cloned repository) and rely on social engineering to get it opened.

The attacker needs to control the contents of a folder the victim will open, particularly the .git/config file. They do not need prior access to the victim's machine; the main prerequisite is convincing the victim to open the crafted repository in Zed.

The safest pattern is to treat repository-local configuration as untrusted for any operation that can lead to code execution. Disable or severely restrict config-driven helpers (like core.fsmonitor or hooks) in untrusted workspaces, and ensure any remaining helpers run in a constrained environment with clearly bounded behavior.

Design IDE and tooling integrations so that untrusted content—projects, repositories, and configuration files—cannot directly influence system-level commands or helpers. Enforce a security model that distinguishes trusted vs. untrusted workspaces, forbids execution derived from untrusted configuration, and incorporates automated checks and reviews for new execution paths introduced by future features.

Find out what's already
exploitable in your codebase.