CVE-2026-144339: filelock: Read-handle oplock stalls unrelated async tasks on Windows
filelock is a platform-independent file lock for Python. Prior to 4.3.0, on Windows, a local account with read access to a native lock file can delay a nonblocking or short-timeout FileLock acquisition. With AsyncFileLock(runinexecutor=False), the delay also blocks unrelated tasks on the event loop. The default executor keeps the loop responsive but an acquisition can still miss its own deadline on the affected release. The delay is caused by a Windows opportunistic lock (oplock). This issue is fixed in version 4.3.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
filelockto a version that resolves this vulnerability.Fixed in 4.3.0
Event History
Frequently Asked Questions
Who can trigger the delay?
A local account that has read access to the native lock file can trigger it on Windows. The issue does not describe a remote attack path.
Which async usage has the greatest impact?
AsyncFileLock(run_in_executor=False) can block unrelated tasks on the event loop while the lock acquisition is delayed. Using the default executor keeps the event loop responsive, but the acquisition itself can still miss its deadline.
Are short lock timeouts sufficient to avoid the issue?
No. A nonblocking or short-timeout FileLock acquisition can be delayed, and even the default-executor path can miss its own deadline on affected releases.
How can I determine whether an application is affected?
Check whether it runs filelock on Windows at a version earlier than 4.3.0 and uses native lock files that local accounts can read. Applications using AsyncFileLock with run_in_executor=False have the additional risk of unrelated event-loop tasks being stalled.
What remediation is available?
Upgrade filelock to version 4.3.0, which fixes the issue.