knowns versions before 0.31.0 fail to properly validate the x-opencode-directory request header in the /api/opencode
Knowns versions older than 0.31.0 let a remote user direct file operations outside the project folder. That can expose or change files on the host system.
- Severity
- CriticalCVSS 3.1 · 9.8
- Fix
- Fixed in 0.31.0Fix recorded yesterday
- Affected versions
- before 0.31.0
- Weakness
- CWE-73
- Exploit likelihood
- 0.44% in 30 daysEPSS, higher than 37% of known flaws
- Affects
- knowns
- Exploited
- Not confirmedNo confirmation recorded
- EU ID
- EUVD-2026-75579ENISA vulnerability database
How it works
- A remote client can provide a chosen directory in a request to Knowns' OpenCode proxy.
- Older versions pass that directory to the OpenCode agent instead of enforcing the project folder.
- The agent then performs file operations in the selected directory on the host system.
What to do
Run npm list knowns in each environment using the package. Versions below 0.31.0 are affected; version 0.31.0 or later is outside the published affected range.
Run this in the application environment you want to check:
npm list knownsUpgrade Knowns to 0.31.0 or later. That release removed the embedded OpenCode proxy and Chat UI attack surface.
Technical details
CVE-2026-88899 is an unauthenticated directory-control flaw in Knowns' /api/opencode proxy. A network client can direct file operations outside the project root on the host system.
Severity breakdown
- Attack vector Network Requires network access to the vulnerable service
- Attack complexity Low Low complexity under the assessed conditions
- Privileges required None Attacker needs no account or login
- User interaction None No victim action needed
- Scope Unchanged Impact stays within the same security authority
- Confidentiality impact High Sensitive data can be exposed with serious impact
- Integrity impact High Protected data can be changed with serious impact
- Availability impact High The service can stop or suffer serious disruption
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Open in FIRST.org calculatorReferences
- github.com · v0.31.0 (tag) vendor advisory release-notes patch release notes
- github.com · commit 37db056 patch NVD
- github.com · server.go (0.30.0) L1283 vendor advisory technical-description NVD
- github.com · GHSA-9h2q-r9fh-f98w vendor-advisory vendor advisory
- cve.org · CVERecord vdb entry
- tenable.com · CVE-2026-88899 third party advisory vdb entry
- cvefeed.io · CVE-2026-88899 third party advisory vdb entry
- cveawg.mitre.org · CVE-2026-88899
- vulncheck.com · knowns-before-0.31.0-external-control-of-agent-working-directory-via-x-opencode-directory-header third-party-advisory NVD