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.
Github GHSA