---
id: CVE-2026-88899
title: >-
  knowns before 0.31.0 External Control of Agent Working Directory via
  x-opencode-directory Header
summary: >-
  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 roo…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-73
vendor: knowns-dev
product: knowns
affected:
  - knowns < 0.31.0
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-09-11T17:11:17.124340Z'
published: '2026-09-10'
updated: '2026-09-11'
sourceUpdated: '2026-09-11T20:33:42.233Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-88899'
references:
  - url: >-
      https://github.com/knowns-dev/knowns/security/advisories/GHSA-9h2q-r9fh-f98w
    label: GitHub Security Advisory (GHSA-9h2q-r9fh-f98w)
  - url: >-
      https://github.com/knowns-dev/knowns/blob/v0.30.0/internal/server/server.go#L1283-L1296
  - url: >-
      https://github.com/knowns-dev/knowns/commit/37db0561b37b48b8bd035a417d7f1da6258ae657
  - url: 'https://github.com/knowns-dev/knowns/releases/tag/v0.31.0'
    label: knowns v0.31.0 Release Notes
  - url: >-
      https://www.vulncheck.com/advisories/knowns-before-0.31.0-external-control-of-agent-working-directory-via-x-opencode-directory-header
    label: >-
      VulnCheck Advisory: knowns before 0.31.0 External Control of Agent Working
      Directory via x-opencode-directory Header
tags:
  - cve.org
  - exploit-available
epss: 0.00809
epssPercentile: 0.54998
ingestedAt: '2026-09-14T11:11:19.881Z'
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/uziii2208/CVE-2026-88899'
  checkedAt: '2026-09-25T08:21:20.826Z'
exploitAvailable: true
---

## Overview

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.

## Affected

- `knowns < 0.31.0`

## Remediation

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