CVE-2026-144405: FileLock on Unix lets two processes hold one lock after another user removes the lock file
filelock is a platform-independent file lock for Python. From 3.13.2 until 4.2.12, on Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock. oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026. The affected native Unix lock is UnixFileLock, which FileLock selects where fcntl is available. Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here. This issue is fixed in version 4.2.12.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.2.12
Event History
Frequently Asked Questions
Which environments are exposed to this issue?
The issue affects filelock versions from 3.13.2 through 4.2.11 on Unix when FileLock uses UnixFileLock, which it selects where fcntl is available. Exploitation also requires a lock path in a sticky directory such as /tmp.
What does an attacker need to do to cause the lock failure?
Another local account must create a regular file at the lock path and own that file. While a process holds the lock, that account can remove the file; a subsequent process can then create and lock a replacement file at the same path.
What is the practical impact of successful exploitation?
Two cooperating processes can enter the protected section simultaneously despite each holding an exclusive lock. This can cause protected data to be written twice or left inconsistent, but the attacker does not gain access to the protected resource or code execution.
How can I determine whether an installation needs remediation?
Check whether the installed filelock version is earlier than 4.2.12 and whether it uses UnixFileLock on a Unix system. Installations using lock paths in sticky directories where another local account can create and remove the lock file meet the described exposure conditions.
What version fixes the issue?
The issue is fixed in filelock version 4.2.12.