Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach MCP server network endpoint
-
DeliveryCraft code_replace request with traversal path
-
ExploitSubmit path (e.g., ../../.ssh/authorized_keys) with malicious content
-
ExecutionServer resolves path outside project root without validation
-
PersistOverwrite sensitive file (SSH keys, shell rc)
-
ImpactEstablish persistent unauthorized access
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the attacker can send an MCP tool call (specifically an action targeting code replacement, insertion, deletion, or rename) to the knowns MCP server process. The server must be reachable over the network or locally; the CVSS 4.0 AV:N rating indicates network exposure is the assessed baseline. Passive user interaction (UI:P) is required - a developer must have initiated a knowns MCP session, meaning the server process is running. No authentication credential is required (PR:N). The attacker must supply a path parameter containing either an absolute filesystem path (e.g., /etc/cron.d/backdoor) or a relative path with directory traversal sequences (e.g., ../../.ssh/authorized_keys). What limits exploitation: the MCP server must be network-accessible rather than strictly localhost-only; on default single-developer workstation deployments, the server may only listen on loopback, requiring local process access or prompt injection via an AI client to deliver the payload. Versions 0.30.0 and later are not vulnerable due to the safepath containment guard. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P) scores 7.2 and captures the key risk profile accurately: network-reachable, low complexity, no authentication, with passive user interaction reflecting that a developer must be running the MCP server session. Real-world risk is meaningful but bounded: this is a developer-facing tool, so the attack surface is developers' workstations rather than production infrastructure - however, writing to ~/.ssh/authorized_keys or shell rc files yields persistent unauthorized access to the developer's machine and, by extension, any systems they can reach. EPSS data is not available in the provided input, limiting probability-of-exploitation comparison. No KEV listing; no public exploit confirmed. The CVSS integrity and availability impacts (VI:H/VA:H) are accurate - arbitrary file writes to critical dotfiles can both corrupt the system (A:H) and implant backdoors (I:H). The C:L rating is plausible because the vulnerability is primarily write-oriented, but a write to a symlinked or log file could result in indirect read amplification. Overall: elevated priority for teams using knowns in multi-user or CI environments; lower urgency for fully isolated single-developer setups. |
| Exploit ScenarioDerived | An attacker who can send requests to a developer's locally running knowns MCP server - whether through a malicious AI prompt injection, a compromised AI client, or direct API access on a shared host - sends a code_replace MCP call with path set to ../../home/user/.ssh/authorized_keys and content containing their own public key. The pre-0.30.0 server resolves the path outside the project root without validation and writes the attacker's key, granting persistent SSH access to the developer's machine. No public exploit is confirmed, but the GitHub advisory and VulnCheck report supply sufficient implementation detail to reproduce the technique trivially. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 07, 2026
Path traversal in the knowns MCP server's handleCodeReplace() function allows unauthenticated network attackers to overwrite arbitrary files outside the project root, including shell startup scripts (~/.bashrc, ~/.zshrc) and SSH configuration files (~/.ssh/authorized_keys). All knowns releases before v0.30.0 are affected; the root cause is the absence of path sanitization - the original code unconditionally joined caller-supplied paths onto the project root without verifying the resolved path remained within that boundary. No active exploitation confirmed in CISA KEV; no public exploit identified at time of analysis, though the GitHub security advisory and VulnCheck report provide sufficient technical detail for exploit construction.
RemediationAI
Upgrade to knowns v0.30.0 or later; this is the vendor-released patch that introduces path containment validation via the safepath package and the ensureCodeMutationPath() guard function (patch commit a2c98fc5c313463576c9348beeec6a74ddd7333b, release tag v0.30.0). The fix is comprehensive - it covers handleCodeReplace(), handleCodeInsert(), handleCodeDelete(), handleCodeRename(), and the shared applyWorkspaceEdit() path. If an immediate upgrade is not feasible, restrict network access to the MCP server endpoint to localhost or a trusted internal interface only, reducing exposure to local-only attack vectors; note that this does not eliminate the vulnerability for multi-user workstations. Additionally, run the MCP server process under a dedicated low-privilege user account with minimal write permissions to home directories, limiting the blast radius of any exploitation. Monitor filesystem writes to ~/.ssh/, ~/.bashrc, ~/.zshrc, and similar sensitive paths as a detection control. Advisory: https://github.com/knowns-dev/knowns/security/advisories/GHSA-f539-xgc6-xw7q.
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 (CPE: cpe:2.3:a:knowns-dev:knowns) is a Go-based MCP (Model Context Protocol) server used as an AI coding assistant backend. MCP handlers expose file-mutation operations - code replacement, insertion, deletion, and rename - to AI clients over a network interface. The vulnerable code in internal/mcp/handlers/code.go (line ~608-646, tag v0.29.1) constructed an absolute path from caller-supplied input using only filepath.Join(projectRoot, path) with a minimal absolute-path check; it applied no containment validation against the project root, no symlink resolution, and no blocked-path enforcement. CWE-22 (Path Traversal) applies directly: inputs such as absolute paths (/etc/passwd) or relative sequences (../../home/user/.ssh/authorized_keys) escaped the intended project boundary entirely. The fix (commit a2c98fc5) introduces a safepath.ResolveProject() helper and an ensureCodeMutationPath() guard that evaluates symlinks, resolves the canonical real path, computes the relative path from the project root, and rejects anything that would escape or touch managed directories (.knowns, .git).
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:P/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N
Network-accessible MCP server, no auth required, passive session interaction needed; integrity and availability high from arbitrary file writes to sensitive dotfiles.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
knowns versions before 0.30.0 contain a path traversal vulnerability in the handleCodeReplace() function that allows attackers to overwrite arbitrary files outside the project root. Attackers can supply absolute paths or relative paths containing directory traversal sequences to write malicious content to sensitive files like shell startup scripts or SSH configuration files.
Technical POC Analysis
CWE-22 path traversal in internal/mcp/handlers/code.go, function handleCodeReplace() (advisory quotes pre-fix lines 611-644).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The knowns Model Context Protocol server versions prior to v0.30.0 contain a path traversal vulnerability allowing unauthenticated remote attackers to overwrite critical system files, including SSH authorization keys and shell startup scripts. This exposes affected systems to persistent unauthorized access and potential code execution. A vendor patch is available and should be deployed immediately.
Apply vendor patch: upgrade knowns MCP server to v0.30.0 or later.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Missing authentication in Knowns (knowns-dev/knowns) before 0.30.0 exposes the management API on all network interfaces
External control of a filesystem path in Knowns (knowns-dev/knowns) before 0.31.0 lets remote attackers escape the proje
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
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-72559
GHSA-g6q2-h5cf-8q26
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB