---
id: "CVE-2026-112941"
kind: "vulnerability"
aliases: ["CVE-2026-112941"]
title: "filelock: cached lock-tree check lets local users redirect lock writes"
severity: "low"
cvss: 3.3
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "tox-dev filelock", "fixed": ["4.2.1"], "affected": ">= 4.1.0, < 4.2.1", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["filelock", "package", "python", "self-hosted"]
not_affected_if: ["default-lock-types-only", "single-user-machine"]
published_at: "2026-10-20T15:17:16+00:00"
first_seen_at: "2026-10-23T21:57:20+00:00"
updated_at: "2026-10-25T04:46:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112941", "first_seen_at": "2026-10-23T21:57:20+00:00"}]
---

# filelock: cached lock-tree check lets local users redirect lock writes

Python's filelock library, versions 4.1.0 through 4.2.1, caches a check of the <path>.rw lock directory and resolves its names again on later writes. A local user who can replace that directory after the first lock is taken can redirect lock-record writes into directories the lock user can write to.

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

## Affected

- vendor:tox-dev filelock affected >= 4.1.0, < 4.2.1 fixed 4.2.1

## How to check

- Run `pip show filelock` and confirm the installed version is between `4.1.0` and `4.2.0`.
- Check whether code uses `SoftReadWriteLock` or `AsyncSoftReadWriteLock` from filelock.

## Fix

- Upgrade filelock to `4.2.1` or later (`pip install -U "filelock>=4.2.1"`).

## Timeline

- 2026-10-23T21:57:20+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-112941

## From the sources

filelock is a platform-independent file lock for Python. From 4.1.0 until 4.2.1, SoftReadWriteLock and AsyncSoftReadWriteLock cache a successful check of the <path>.rw lock tree and resolve its names again during later record operations, allowing another local user who can replace that tree after the first acquisition to redirect lock-record writes into directories writable by the lock user. This issue is fixed in version 4.2.1.

---

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