Description
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.
Published: 2026-10-20
Score: 4.7 Medium
EPSS: n/a
KEV: No
Impact: Race Condition Allowing Dual Lock Holders
Action: Patch Immediately
AI Analysis

Impact

The vulnerability is a race condition in SoftFileLock's stale‑lock removal logic. When an attacker releases its own stale lock marker, an honest contender can create a new lock using the same inode; if the modification time of the new marker is not newer than the observation stored by SoftFileLock, the library mistakenly deletes the live marker and permits two concurrent holders. This breaks the expected exclusive lock guarantee, potentially allowing concurrent processes to modify the same shared resource.

Affected Systems

The affected vendor and product are tox‑dev:filelock, the Python filelock library. Versions from 3.22.0 up to (but not including) 4.2.1 contain the flaw. The fix is available in release 4.2.1 and later.

Risk and Exploitability

The CVSS score of 4.7 indicates low severity, and no EPSS score is available. The issue is not listed in the CISA KEV catalog. The likely attack vector is local; it requires concurrent access to the same lock file by two processes, one of which could be malicious, and relies on a race condition that must be precisely timed. While exploitation is non‑trivial, the breach of mutual exclusion can lead to data corruption or interference between processes.

Generated by OpenCVE AI on October 20, 2026 at 16:54 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the filelock library to version 4.2.1 or later
  • Ensure that stale lock handling is disabled or configured with a high timeout, or explicitly avoid using SoftFileLock
  • If upgrading is not possible, consider switching to a different locking mechanism or using the FastFileLock backend

Generated by OpenCVE AI on October 20, 2026 at 16:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 20 Oct 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Tox-dev
Tox-dev filelock
Vendors & Products Tox-dev
Tox-dev filelock

Tue, 20 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
Description 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.
Title filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders
Weaknesses CWE-367
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N'}


Subscriptions

Tox-dev Filelock
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-20T14:32:25.740Z

Reserved: 2026-10-19T21:30:47.244Z

Link: CVE-2026-112935

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-20T15:17:16.243

Modified: 2026-10-20T15:17:16.243

Link: CVE-2026-112935

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T17:00:18Z

Weaknesses
  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition