CVE-2026-144395: filelock: ReadWriteLock can overwrite victim-owned files through a directory swap
filelock is a platform-independent file lock for Python. Prior to 4.3.0, on POSIX, another account with rename access in a shared, non-sticky lock directory can redirect a SQLite-backed ReadWriteLock operation to a file writable by the locking process. A cross-account overwrite was confirmed on Linux. The affected setup also required a victim-owned directory that the other account could previously read. This issue is fixed in version 4.3.0.
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.3.0
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
The issue affects filelock versions before 4.3.0 on POSIX systems when a SQLite-backed ReadWriteLock uses a shared, non-sticky lock directory. A cross-account overwrite was confirmed on Linux.
What access does an attacker need to exploit it?
The attacker needs rename access in the shared lock directory. The affected setup also requires a victim-owned directory that the attacker could previously read.
Is a default lock-directory configuration known to be affected?
The available information identifies a specific shared, non-sticky lock-directory setup; it does not state whether the default configuration uses such a directory or is affected.
What can be done if upgrading is not immediately possible?
Avoid using SQLite-backed ReadWriteLock operations in shared, non-sticky lock directories where another account has rename access. Restrict access so untrusted accounts cannot rename entries in the lock directory.
How can I remediate the issue?
Upgrade filelock to version 4.3.0 or later.