---
id: "CVE-2026-122235"
kind: "vulnerability"
aliases: ["CVE-2026-122235"]
title: "Jan: agent write tool follows dangling symlinks, writing files outside workspace"
severity: "medium"
cvss: 5.7
epss: null
exploited: false
status: "open"
category: "ai-tooling"
products: []
ecosystems: []
tags: ["ai-agents", "ai-tooling", "desktop", "jan", "local-llm"]
not_affected_if: ["no-agent-file-tools", "trusted-repos-only", "version-0.8.8-or-later"]
published_at: "2026-11-04T21:18:11+00:00"
first_seen_at: "2026-11-04T21:49:21+00:00"
updated_at: "2026-11-04T21:51:22+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-122235", "first_seen_at": "2026-11-04T21:49:21+00:00"}]
exploit_sources: []
---

# Jan: agent write tool follows dangling symlinks, writing files outside workspace

Jan, an AI app, has a flaw in its agent tools where the write and edit tools follow dangling symlinks and write files outside the project workspace. A malicious repository plus prompt injection can make the agent create files such as ~/.ssh/authorized_keys on the host.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed Jan version and whether it is within the affected range (from 0.8.5 before 0.8.8), for example in the app's About screen or package manager listing
- Review whether Jan's agent tools were used on untrusted repositories

## Fix

- Move Jan to `0.8.8` or later

## Timeline

- 2026-11-04T21:49:21+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-122235

## Documents

- [advisory] Vendor advisory: github.com https://github.com/janhq/jan/security/advisories/GHSA-7j4g-mj5j-p842
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/jan-0.8.5-before-0.8.8-workspace-guard-bypass-via-dangling-symlink
- [fix] Patch: github.com https://github.com/janhq/jan/commit/840c33e65182ba9975d32f710c5d111e25444b65
- [fix] Release notes: github.com https://github.com/janhq/jan/releases/tag/v0.8.8

## From the sources

Jan from 0.8.5 before 0.8.8 contains a workspace guard bypass vulnerability in the agent-tools gate.rs that allows attackers to write files outside the workspace via dangling symlinks. Attackers supplying a malicious repository can use prompt injection to make the write or edit tools follow symlinks, creating files like ~/.ssh/authorized_keys on the host.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
