Description
Zed is a code editor. Prior to 0.227.1, Zed builds SSH/WSL remote commands as a shell command string that starts with exec env ..., but environment variable keys are inserted without shell quoting or validation. If an attacker can control an environment variable key (for example via project terminal settings), shell expansions in the key (such as $(...)) are evaluated by the remote shell when a terminal is opened. This can lead to arbitrary command execution on the remote host under the victim user's account. This vulnerability is fixed in 0.227.1.
Published: 2026-05-28
Score: 8.6 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In Zed 0.226.x and earlier, the editor constructs SSH and WSL remote shell commands by prepending "exec env ..." to a string that includes environment variable keys unquoted and unvalidated. When an attacker can supply a key containing shell expansion syntax—such as $(command)—that syntax is interpreted by the remote shell, allowing the attacker to run arbitrary commands as the victim user. This flaw is a classic example of CWE‑78, the use of unsafe input in an operating system command execution context.

Affected Systems

Zed Industries’ Zed code editor is affected, specifically all releases older than 0.227.1. The vulnerability exists for all platforms that support SSH or WSL remote terminal sessions.

Risk and Exploitability

The vulnerability carries a CVSS base score of 8.6, indicating a high severity. The EPSS score is not publicly available, but the nature of the flaw—remote command execution via a locally controllable environment variable—suggests a high likelihood of exploitation if the environment variable can be influenced. The attack vector is inferred to be through project terminal settings or similar configuration interfaces that allow an attacker to set environment variable names; the attack requires network access to the remote host via SSH/WSL and local control over Zed’s configuration. The vulnerability is not currently listed in CISA’s KEV catalog, but the high impact warrants pre-emptive action.

Generated by OpenCVE AI on May 28, 2026 at 18:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Zed to version 0.227.1 or later, where the vulnerable code path has been fixed.
  • If an upgrade cannot be applied immediately, modify any project terminal settings that allow custom environment variable keys so that key names contain no shell metacharacters or expansion syntax; consider escaping or sanitising the values used as keys.
  • Until the patch is available, disable or restrict the SSH/WSL remote terminal functionality so that no remote shell commands are executed from the editor.

Generated by OpenCVE AI on May 28, 2026 at 18:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 28 May 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Zed-industries
Zed-industries zed
Vendors & Products Zed-industries
Zed-industries zed

Thu, 28 May 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 28 May 2026 17:00:00 +0000

Type Values Removed Values Added
Description Zed is a code editor. Prior to 0.227.1, Zed builds SSH/WSL remote commands as a shell command string that starts with exec env ..., but environment variable keys are inserted without shell quoting or validation. If an attacker can control an environment variable key (for example via project terminal settings), shell expansions in the key (such as $(...)) are evaluated by the remote shell when a terminal is opened. This can lead to arbitrary command execution on the remote host under the victim user's account. This vulnerability is fixed in 0.227.1.
Title Zed: Remote Command Injection via Unquoted Environment Variable Keys (SSH / WSL Remote)
Weaknesses CWE-78
References
Metrics cvssV3_1

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


Subscriptions

Zed-industries Zed
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-28T17:28:02.304Z

Reserved: 2026-05-06T15:49:25.193Z

Link: CVE-2026-44461

cve-icon Vulnrichment

Updated: 2026-05-28T17:27:58.733Z

cve-icon NVD

Status : Received

Published: 2026-05-28T17:16:28.853

Modified: 2026-05-28T18:16:32.990

Link: CVE-2026-44461

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-28T18:30:23Z

Weaknesses