Description
Missing path validation in the Worktree.remove component of openCode v1.18.26 allows attackers to execute arbitrary recursive directory deletion via a crafted payload.
Published: 2026-09-22
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary Recursive Directory Deletion
Action: Apply Patch
AI Analysis

Impact

A missing path validation check in the Worktree.remove component of openCode v1.18.26 allows attackers to craft a payload specifying any directory path. When the function processes the payload, it performs a recursive delete on the supplied path, resulting in data loss and potential service disruption. This flaw arises from an input validation failure and permits destructive file system operations without authorization.

Affected Systems

The affected product is the openCode framework version 1.18.26. No additional vendor or product information is supplied by the CNA data.

Risk and Exploitability

The vulnerability can be triggered by sending a crafted request to the Worktree.remove endpoint. If the endpoint is exposed to external users, remote exploitation is possible; the description implies that local access may also suffice, but the exact attack vector is inferred from the typical use of this component and is not explicitly stated in the CVE data. The CVSS score of 9.1 reflects the high impact of arbitrary deletion, while the EPSS score of less than 1% indicates a low probability of exploitation in current field samples. The issue is not listed in the CISA KEV catalog, further confirming that no widespread, actively exploited instances are known. Nonetheless, because the flaw allows deletion of any directory specified by the attacker, the potential loss and integrity damage is significant and requires prompt action when the affected version is in use.

Generated by OpenCVE AI on September 23, 2026 at 18:52 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest openCode release that incorporates proper path validation in Worktree.remove
  • If an immediate upgrade is not feasible, restrict file system permissions for the user account running openCode so that it cannot delete or modify directories outside the intended workspace
  • Monitor the file system for unexpected deletions and set up alerts to detect abuse of the Worktree.remove functionality

Generated by OpenCVE AI on September 23, 2026 at 18:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 28 Sep 2026 20:15:00 +0000

Type Values Removed Values Added
First Time appeared Opencode
Opencode opencode
Vendors & Products Opencode
Opencode opencode

Wed, 23 Sep 2026 19:15:00 +0000

Type Values Removed Values Added
Title Arbitrary Recursive Directory Deletion in openCode Worktree.remove

Wed, 23 Sep 2026 17:45:00 +0000

Type Values Removed Values Added
Title Recursive Directory Deletion via Missing Path Validation in openCode Worktree.remove
Weaknesses CWE-20

Wed, 23 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22
Metrics cvssV3_1

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

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 22 Sep 2026 21:15:00 +0000

Type Values Removed Values Added
Title Recursive Directory Deletion via Missing Path Validation in openCode Worktree.remove
Weaknesses CWE-20

Tue, 22 Sep 2026 19:45:00 +0000

Type Values Removed Values Added
Description Missing path validation in the Worktree.remove component of openCode v1.18.26 allows attackers to execute arbitrary recursive directory deletion via a crafted payload.
References

Subscriptions

Opencode Opencode
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-09-23T14:52:43.416Z

Reserved: 2026-09-10T00:00:00.000Z

Link: CVE-2026-88624

cve-icon Vulnrichment

Updated: 2026-09-23T14:50:16.719Z

cve-icon NVD

Status : Deferred

Published: 2026-09-22T20:17:11.260

Modified: 2026-09-24T21:08:55.030

Link: CVE-2026-88624

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-28T19:48:08Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')