Summary
CVE-2026-86538 is a path traversal vulnerability (CWE-22) in knowns, an open-source, self-hostable "memory layer" tool that gives AI assistants persistent, structured access to a software project’s knowledge base. The flaw resides in the POST /api/templates/preview endpoint, where the templateFile parameter is not properly sanitized, allowing an unauthenticated remote attacker to read arbitrary files from the host filesystem. The issue affects all versions prior to 0.30.0 and carries a CVSS score of 8.7 (High).
Technical details
- Root cause: The
templateFileparameter passed to thePOST /api/templates/previewendpoint is used to build a filesystem path without adequate validation or canonicalization, permitting directory traversal sequences (e.g.,../). - Trigger conditions: No authentication or special privileges are required to reach the vulnerable endpoint; an attacker simply issues a crafted HTTP POST request containing traversal sequences in
templateFile. - Attack vector: Network — the endpoint is exposed over HTTP(S) as part of the knowns REST API and can be reached by any party with network access to the service.
- Impact: Successful exploitation returns the contents of arbitrary files on the host (including credentials, configuration files, and other sensitive data) within the JSON response, resulting in a high confidentiality impact with no direct effect on integrity or availability.
- The vendor’s own release notes for version 0.30.0 indicate this path traversal issue was fixed alongside several other vulnerabilities (including RCE and SSRF issues) that were remediated in the same release.
Affected software
- Product: knowns (npm package
knowns, vendorknowns-dev) - Affected versions: All versions prior to 0.30.0
- Fixed version: 0.30.0 and later
Severity
- CVSS v3.1 Base Score: 7.5 (High) —
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS v4.0 Score: 8.7 (High) —
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Mitigation and recommended actions
- Immediate: Upgrade knowns to version 0.30.0 or later, where the path traversal in the templates preview endpoint has been remediated.
- If immediate patching is not possible:
- Restrict network access to the knowns service (e.g., bind to localhost or place behind a firewall/VPN) so that the
/api/templates/previewendpoint is not reachable from untrusted networks. - Monitor and block requests to
/api/templates/previewcontaining path traversal sequences (../, encoded variants) via a web application firewall or reverse proxy rule as a temporary compensating control. - Audit exposed instances for evidence of unexpected file-read requests in access logs.
- Restrict network access to the knowns service (e.g., bind to localhost or place behind a firewall/VPN) so that the

