---
id: CVE-2026-86541
title: >-
  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
summary: >-
  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 c…
severity: high
cvss: 8.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:H'
cwe:
  - CWE-22
vendor: knowns-dev
product: knowns
affected:
  - knowns < 0.30.0
published: '2026-09-07'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T16:18:03.043'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-86541'
references:
  - url: >-
      https://github.com/knowns-dev/knowns/blob/v0.29.1/internal/mcp/handlers/code.go#L588-L646
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/knowns-dev/knowns/commit/a2c98fc5c313463576c9348beeec6a74ddd7333b
    label: disclosure@vulncheck.com
  - url: 'https://github.com/knowns-dev/knowns/releases/tag/v0.30.0'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/knowns-dev/knowns/security/advisories/GHSA-f539-xgc6-xw7q
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/knowns-before-0.30.0-path-traversal-via-code-replace-mcp-action
    label: disclosure@vulncheck.com
tags:
  - nvd
  - cve.org
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-09-10T14:27:48.486769Z'
epss: 0.00768
epssPercentile: 0.53676
ingestedAt: '2026-09-08T15:33:26.980Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
