Finding / opencode

2026-10-24-opencode-v1-worktree-deletion-remains-unresolved-while-v2-requires-a-stored-worktree

V1 worktree deletion remains unresolved while V2 requires a stored worktree. Historical triage for this first profile: NVD records a report of arbitrary recursive directory deletion through Worktree.remove in v1.18.26. Its linked external report returned 404 to the crosschecker, leaving the entry point, authorization conditions and fixed version unresolved. At v1.19.4, if a caller’s canonical directory is absent from git’s worktree list but exists, the implementation still calls cleanDirectory, which recursively removes it. That source behavior does not establish an unauthenticated current-version exploit. V2.1.4 instead requires a stored project worktree with a strategy and otherwise returns InvalidDirectoryError; the model-facing removal tool also checks edit. The old report does not prove an exposed V2.1.4 exploit.

Channel: docs-only. Half: defect. Date: 2026-09-24.

Operator consequence: Gate destructive V1 worktree removal and inspect the supplied directory before relying on it. Do not claim that V1.19.4 fixes the historical report simply because it is newer, or apply the V1 report to V2 without proving a reachable path. A recovered technical report plus a versioned reproduction and fixed-release mapping would settle V1 exposure.

Receipt

Finding metadata

Run: 2026-10-24-weekly-digest-2026-10-13_2026-10-24-frontier-v0

Finding ID: 2026-10-24-opencode-v1-worktree-deletion-remains-unresolved-while-v2-requires-a-stored-worktree

Profile citations

Source links

Primary links, including exact changelog lines when available.