Resolved

Restricted Mode, except for the task file

Zed's title bar read Restricted Mode, and the editor still loaded a repository's own task file, ready to run from the task picker. The trust fix that guarded settings never covered tasks.

Logged 29 Nov 2026

The trust gate covered one file

Zed shipped a worktree trust mechanism in version 0.218.2 to close two earlier advisories that both concerned how much a project could be trusted. The gate covered one file. It asked whether a project's settings could be trusted and enforced that answer where .zed/settings.json was read, but it never asked the same question about .zed/tasks.json or .zed/debug.json.

So a repository's task file loaded anyway. Zed read the file, listed its tasks in the picker, and offered to run them, all while the title bar said Restricted Mode. A user who chose to stay restricted, believing the project was contained, saw no warning that the tasks came from an untrusted source.

The advisory names the exact cause in crates/project/src/project_settings.rs, where the update_settings method handles four kinds of config from the .zed directory. Only the settings branch calls can_trust_worktree. The tasks branch and the debug branch skip the check entirely, and nothing further down the chain adds one: the advisory lists four downstream files that do not.

Nothing downstream checked

The proof of concept is small. A one-entry task named Build Project runs bash to write the current user's name to a file in /tmp, and nothing marks the task as coming from an untrusted repository. With trust-all disabled and the user in Restricted Mode, the task appears in the picker and runs when selected, writing the file.

The advisory rates the flaw High, 7.1 on the CVSS v3.1 scale, and marks it an incomplete fix for the two advisories that the trust mechanism was built to close. The same mechanism now protects settings.json and was never extended to the two files that run commands, so every release before the patch is affected. Zed patched it in 1.28.1.

Log take: The fix stopped one step short. The mechanism existed and it guarded the settings file in the same directory, yet it was never extended to the task and debug files beside it. The title bar made the gap visible to the user it failed. Confidence is high: the advisory traces the branch, the proof of concept reproduces it, and the patched version is named. Zed is an editor rather than a conversational agent, which narrows the parallel, and the common step is opening an untrusted repository; here that was enough.

Sources

Research