---
id: "CVE-2026-112939"
kind: "vulnerability"
aliases: ["CVE-2026-112939"]
title: "filelock: forged process ID in SoftFileLock marker lets a rival take the lock"
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", "multi-user-systems", "package", "python", "shared-hosts"]
not_affected_if: ["filelock-os-backend-only", "single-user-host", "version-4.2.1-or-later", "version-below-3.22.0"]
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-112939", "first_seen_at": "2026-10-23T21:57:20+00:00"}]
---

# filelock: forged process ID in SoftFileLock marker lets a rival take the lock

Versions of the Python filelock package from 3.22.0 up to 4.2.1 let a process trust a forged process identifier in a SoftFileLock marker file. A local user who can modify that marker can cause the live lock to be removed and another holder admitted, breaking mutual exclusion.

_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

- Check the installed version with `pip show filelock` or `python -c "import filelock; print(filelock.__version__)"`, and flag anything from `3.22.0` up to but not including `4.2.1`.
- Find code that uses `SoftFileLock` (for example `grep -rn "SoftFileLock" .`) on shared hosts or in multi-user environments.

## Fix

- Upgrade the Python package `filelock` to `4.2.1` or later, for example `pip install --upgrade "filelock>=4.2.1"`.
- Pin the fixed version in requirements or lock files and rebuild.

## Timeline

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

## From the sources

filelock is a platform-independent file lock for Python. From 3.22.0 until 4.2.1, SoftFileLock can trust a forged process identifier in a marker that an attacker can modify but cannot remove, allowing an authorized contender such as another process of the holder's account or root to act as a confused deputy, remove the live marker, and admit another holder. 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_
