CVE-2026-112938

filelock: StrictSoftFileLock follows a symbolic link swapped in at <path>.filelock and creates claim files in a directory another local user chooses

Published Nov 5, 2026 CVSS 3.1 · 5.8 Medium EPSS < 1% KEV · Not listed
Description
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, On POSIX platforms, StrictSoftFileLock and AsyncStrictSoftFileLock validate the coordination directory in _ensure_protocol_directory but later reach the claims directory through _open_directory by pathname, allowing a local account that can rename the coordination name to swap in a symbolic link between check and use during acquisition. That race can create and leave claim files in another writable directory or strand claims in a different strict lock so the second lock times out. Separately, the claims property and force_break follow a resting symbolic link without a race when the lock user inspects or recovers the lock. Claims inspection discloses a file name to the other account only if the resulting exception text or claim_name reaches that account through a shared log, CI output, or error report. A blind force_break recovery that removes live claims from another strict lock can allow two processes into that lock's critical section; this path reaches other strict locks, not arbitrary files. This issue is fixed in version 4.2.1.

Analysis

AI-generated

Technical impact

A local attacker can rename the coordination directory entry of a StrictSoftFileLock or AsyncStrictSoftFileLock between the validation step and the subsequent directory opening. By inserting a symbolic link that points to a directory of the attacker’s choice, the lock logic will create claim files in that directory. The attacker can also trigger a blind force_break, removing live claims from another lock. The consequence is that two processes – possibly belonging to different users – may enter the same critical section, or that the attacker can leave stray claim files that cause other users’ locks to time out. This results in a local integrity and availability compromise, but does not provide arbitrary code execution.

Affected Systems

The vulnerability is present in the Python library tox‑dev:filelock, version 3.30.0 through 4.2.1 on POSIX platforms. Modern Python distributions that pull these package versions into virtual environments, CI pipelines or local development setups are affected.

Risk and Exploitability

The CVSS score is 5.8, indicating moderate severity for a local attack. EPSS data is not available, and the vulnerability is not listed in CISA’s KEV catalog. The attack requires local user access to the directory where the lock’s coordination folder resides, and the ability to create or rename symbolic links in that location. Exploitation relies on a race condition that can be triggered by concurrent lock acquisitions or by explicitly closing and reopening locks with force_break. Because these conditions are feasible on a shared filesystem, the risk to multi‑user hosts is significant, but the exploitation window is limited to the time between validation and directory opening. Thus the vulnerability is practically exploitable when an attacker can influence the filesystem state of the lock’s coordination directory.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade tox‑dev:filelock to version 4.2.1 or later, which removes the race condition between coordination directory validation and claim directory creation.
  • If an immediate upgrade is not possible, restrict write permissions on the coordination and claim directories so that only the intended user can rename or create entries, thereby preventing a local user from swapping in a malicious symbolic link.
  • For applications requiring high integrity, avoid using StrictSoftFileLock or AsyncStrictSoftFileLock in environments with multiple local users; instead, employ a locking mechanism that does not rely on paths or that performs atomic checks and updates within the same system call.

Generated by OpenCVE AI on November 6, 2026 at 14:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-m462-7rxw-wvpg filelock: StrictSoftFileLock follows a symbolic link swapped in at <path>.filelock and creates claim files in a directory another local user chooses
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Tox-dev
Tox-dev filelock
Vendors & Products Tox-dev
Tox-dev filelock
Type Values Removed Values Added
Description filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, On POSIX platforms, StrictSoftFileLock and AsyncStrictSoftFileLock validate the coordination directory in _ensure_protocol_directory but later reach the claims directory through _open_directory by pathname, allowing a local account that can rename the coordination name to swap in a symbolic link between check and use during acquisition. That race can create and leave claim files in another writable directory or strand claims in a different strict lock so the second lock times out. Separately, the claims property and force_break follow a resting symbolic link without a race when the lock user inspects or recovers the lock. Claims inspection discloses a file name to the other account only if the resulting exception text or claim_name reaches that account through a shared log, CI output, or error report. A blind force_break recovery that removes live claims from another strict lock can allow two processes into that lock's critical section; this path reaches other strict locks, not arbitrary files. This issue is fixed in version 4.2.1.
Title filelock: StrictSoftFileLock follows a symbolic link swapped in at <path>.filelock and creates claim files in a directory another local user chooses
Weaknesses CWE-363
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-363

    Race Condition Enabling Link Following

  • CWE-367

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 9, 2026, 5:41 PM
Reserved
Oct 19, 2026, 9:30 PM
Status
Awaiting Analysis
Published
Nov 5, 2026, 10:17 PM
Modified
Nov 9, 2026, 6:17 PM
Severity
Moderate
Public date
Nov 5, 2026, 9:51 PM