Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach Knowns /api/opencode endpoint
-
DeliverySend request with malicious x-opencode-directory header
-
ExploitHeader used unvalidated as working directory
-
ExecutionFile operations escape project root
-
PersistRead/write host files
-
ImpactAchieve code execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Exploitation requires the Knowns Web UI/proxy server (versions before 0.31.0) to be running and its /api/opencode endpoint reachable by the attacker; the attacker then supplies an arbitrary path in the x-opencode-directory request header, which the server uses as the agent working directory without validating it stays within the project root. No authentication or user interaction is required per the CVSS vector (PR:N/UI:N). The key limiting factor is reachability: Knowns' UI server is a developer tool commonly bound to localhost, so practical exploitation depends on the server being exposed on a routable network interface (or reached same-host via a malicious page/SSRF) rather than a hardened default remote service. |
| Impact | The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H, base 9.3) rates this as network-reachable, unauthenticated, low-complexity with high impact on confidentiality, integrity and availability - consistent with the RCE tag if an attacker can reach the endpoint. The strongest caveat is reachability: Knowns' Web UI/proxy is a developer-facing local server typically bound to localhost, so 'remote' exploitation in practice depends on the server being exposed on a routable interface or reached via a same-host malicious page/SSRF; the vector's AV:N is defensible per the description ('remote attackers') but real-world exposure is often narrower than the raw score implies. EPSS is not provided, the CVE is not in CISA KEV, and no POC is published, so despite the high CVSS this currently reads as a real-but-not-yet-actively-exploited priority. The vulnerability was reported by VulnCheck and a vendor security advisory (GHSA-9h2q-r9fh-f98w) plus a patch commit corroborate it, raising confidence in the finding itself. |
| Exploit ScenarioDerived | An attacker who can reach a Knowns Web UI/proxy server (directly, or via a malicious web page or SSRF that causes a request to the local server) sends a crafted request to /api/opencode with x-opencode-directory set to a path such as /etc or a traversal sequence outside the project root. The agent then performs file operations in that attacker-chosen location, enabling reading of sensitive files or writing/overwriting files that lead to code execution on the host. No POC is currently public, and the network-facing, low-complexity, unauthenticated CVSS profile means little attacker effort is required once the endpoint is reachable. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 10, 2026
External control of a filesystem path in Knowns (knowns-dev/knowns) before 0.31.0 lets remote attackers escape the project root by supplying an arbitrary path in the x-opencode-directory header of the /api/opencode proxy endpoint. Because the header is not validated before it becomes the agent's working directory, file operations can be redirected anywhere on the host, which VulnCheck and the vendor advisory characterize as achieving remote code execution (RCE tag). A vendor patch exists in 0.31.0; no public exploit is identified at time of analysis and this is not in CISA KEV.
RemediationAI
Upgrade to Knowns 0.31.0 or later, which contains the fix (Vendor-released patch: 0.31.0; commit 37db0561b37b48b8bd035a417d7f1da6258ae657 and release tag v0.31.0). Until you can upgrade, do not expose the Knowns Web UI/proxy server on any non-loopback interface - bind it strictly to 127.0.0.1 and place it behind a firewall so the /api/opencode endpoint is not reachable from the network; the trade-off is that remote/team access to the Web UI is lost. As additional compensating controls, restrict or block requests carrying an attacker-controllable x-opencode-directory header at a reverse proxy and run the Knowns process under a low-privilege account confined to the project directory so a path escape has limited filesystem reach; note this constrains but does not fully close the flaw. Refer to advisory GHSA-9h2q-r9fh-f98w for authoritative guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Knowns is an AI-oriented project-context tool (CLI, MCP server, and browser Web UI) written in Go. The Web UI server (internal/server/server.go, referenced at v0.30.0 lines 1283-1296) exposes an /api/opencode proxy that forwards requests to an opencode agent, and it reads the target working directory from the client-supplied x-opencode-directory HTTP header. The root cause is CWE-73 (External Control of File Name or Path): the header value is trusted and used to scope file operations without canonicalization or a containment check against the project root, so an attacker-chosen absolute or traversal path (e.g. ../../ or /etc) causes the agent to read/write/execute outside the intended directory. The affected component is identified by CPE cpe:2.3:a:knowns-dev:knowns:*:*:*:*:*:*:*:* for all versions prior to 0.31.0.
Know when Knowns gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Unauthenticated network request with attacker-controlled header (PR:N/UI:N/AC:L) redirects agent file operations outside the project root, yielding full C/I/A impact via RCE.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
knowns versions before 0.31.0 fail to properly validate the x-opencode-directory request header in the /api/opencode proxy endpoint. Remote attackers can supply arbitrary directory paths to execute file operations outside the project root on the host system.
Technical POC Analysis
The vulnerable code is proxyOpenCode() in internal/server/server.go.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Knowns application installations prior to version 0.31.0 are vulnerable to remote code execution through an unvalidated HTTP header parameter in the /api/opencode endpoint, permitting attackers to redirect file operations anywhere on the server filesystem. This affects all deployments running affected versions and represents complete system compromise risk. Immediate patching to version 0.31.0 is required to eliminate this critical risk.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Missing authentication in Knowns (knowns-dev/knowns) before 0.30.0 exposes the management API on all network interfaces
Path traversal in the knowns npm documentation tool (versions ≤ 0.29.1) enables remote unauthenticated attackers to read
Path traversal in knowns before v0.30.0 permits unauthenticated remote attackers to write files outside the designated i
Path traversal in knowns (a Go-based MCP-integrated knowledge management server) before version 0.30.0 allows authentica
Path traversal in the knowns template-preview API (versions before 0.30.0) allows unauthenticated remote attackers to re
Privilege escalation in knowns through 0.33.0 permits authenticated read-only agent sessions to bypass authorization con
Path traversal in the knowns code generation template engine (versions through 0.33.0) allows unauthenticated remote att
Arbitrary binary execution in knowns before 0.30.0 is triggered when a developer opens a repository containing a crafted
Path traversal in the knowns MCP server's handleCodeReplace() function allows unauthenticated network attackers to overw
Authorization bypass in knowns before v0.30.0 allows low-privileged users holding read-restricted sessions to escalate p
Path traversal in knowns through version 0.33.0 allows authenticated AI agent sessions to read arbitrary files anywhere
Server-side request forgery in Knowns ≤0.33.0 enables unauthenticated remote attackers to make the server issue outbound
EUVD-2026-75579
GHSA-w47m-jpv2-qfw5
NVD
CVE.org
EPSS
Exploit-DB