---
id: "CVE-2026-112935"
kind: "vulnerability"
aliases: ["CVE-2026-112935"]
title: "filelock: race lets two processes hold the same SoftFileLock"
severity: "medium"
cvss: 4.7
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "tox-dev filelock", "fixed": ["4.2.1"], "affected": ">= 3.22.0, < 4.2.1", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["filelock", "package", "python", "self-hosted"]
not_affected_if: ["default-config", "single-tenant"]
published_at: "2026-10-20T15:17:16+00:00"
first_seen_at: "2026-10-23T21:57:20+00:00"
updated_at: "2026-10-25T04:35:12+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112935", "first_seen_at": "2026-10-23T21:57:20+00:00"}]
---

# filelock: race lets two processes hold the same SoftFileLock

filelock's SoftFileLock can be tricked into removing a live lock marker after a stale-lock race, so two holders get admitted at once. An attacker who can race lock acquisition on a shared lock path can break mutual exclusion, which can corrupt data guarded by the lock.

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

## Affected

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

## How to check

- Run `pip show filelock` and check whether the version is at least `3.22.0` and below `4.2.1`.
- Search dependency files for `filelock` pins, for example `grep -i filelock requirements*.txt poetry.lock uv.lock`.

## Fix

- Upgrade filelock to `4.2.1` or later, for example `pip install -U "filelock>=4.2.1"`.
- Rebuild and redeploy services that vendor or pin filelock.

## Timeline

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

## From the sources

filelock is a platform-independent file lock for Python. From 3.22.0 until 4.2.1, SoftFileLock can break a stale marker after an attacker frees its own marker following the stale read, an honest contender creates a live successor on the reused inode, and the successor's modification time is not newer than the saved observation, causing the live marker to be removed and two holders to be admitted. 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_
