CVE-2026-8765
Description
A vulnerability was detected in Kilo-Org kilocode up to 7.0.47. This vulnerability affects the function Bun.file of the file packages/opencode/src/kilocode/review/worktree-diff.ts of the component File Diff API Endpoint. Performing a manipulation of the argument File results in path traversal. It is possible to initiate the attack remotely. The exploit is now public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Path traversal in kilocode's file diff API allows remote attackers to read arbitrary server files via crafted 'file' parameter.
A path traversal vulnerability exists in Kilo-Org kilocode versions up to 7.0.47 within the /experimental/worktree/diff/file API endpoint. The flaw lies in the detailMeta function in packages/opencode/src/kilocode/review/worktree-diff.ts, which uses Bun.file(path.join(dir, file)) to access files. The file parameter is user-controlled and not sanitized, allowing directory traversal sequences such as ../ to escape the intended workspace directory [1].
Attackers can exploit this vulnerability remotely without authentication by sending a crafted HTTP request to the endpoint. By setting the file parameter to values like ../../../../etc/passwd, the path traversal bypasses directory restrictions and accesses arbitrary files on the server's filesystem. The request also includes a base parameter (e.g., HEAD) and requires an x-opencode-directory header pointing to a valid workspace instance [1].
Successful exploitation allows an attacker to read any file the server process has access to, including sensitive system files such as /etc/passwd. The file contents are returned in the JSON response under the after field, exposing credentials, configuration files, or other confidential data. Given the public availability of exploit code, unpatched instances are at immediate risk [1].
As the vendor did not respond to disclosure, no official patch is available. Users should restrict network access to the API endpoint, apply web application firewall (WAF) rules to block path traversal patterns, or disable the affected endpoint if not required. This vulnerability is actively exploitable and should be prioritized for mitigation [1].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- gist.github.com/YLChen-007/1770f4530b0c933dc61f15b02aa0629dnvdExploitThird Party Advisory
- vuldb.com/submit/811401nvdExploitThird Party AdvisoryVDB Entry
- vuldb.com/vuln/364390nvdThird Party AdvisoryVDB Entry
- vuldb.com/vuln/364390/ctinvdPermissions RequiredVDB Entry
News mentions
0No linked articles in our index yet.