---
id: "CVE-2026-120325"
kind: "vulnerability"
aliases: ["CVE-2026-120325"]
title: "Knip: path traversal in workspace handler lets attackers write files"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ci", "javascript", "knip", "package", "typescript"]
not_affected_if: ["knip-not-installed", "trusted-input-only"]
published_at: "2026-11-02T03:17:30+00:00"
first_seen_at: "2026-11-02T03:31:23+00:00"
updated_at: "2026-11-02T03:31:51+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120325", "first_seen_at": "2026-11-02T03:31:23+00:00"}]
---

# Knip: path traversal in workspace handler lets attackers write files

Knip, a dead-code finder for JavaScript and TypeScript projects, has a path traversal flaw in its IssueFixer writeFile function when handling the workspaces argument. A remote attacker can use crafted workspace paths to write files outside the intended directory, and a public exploit exists.

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

## How to check

- Check the installed Knip version with `npx knip --version` or `npm ls knip` in each project
- Search lockfiles and CI configs for `knip` to find every place it runs

## Fix

- Knip: unknown; the sources state no fixed version and the vendor did not respond

## Timeline

- 2026-11-02T03:31:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120325

## From the sources

A security vulnerability has been detected in Webpro-nl Knip up to 6.44.0. The impacted element is the function writeFile of the file packages/knip/src/IssueFixer.ts of the component Workspace Handler. Such manipulation of the argument workspaces leads to path traversal. The attack can be executed remotely. The exploit has been disclosed publicly and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

---

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