CVE-2026-144341: CVE-2026-144341: Windows Oplock Asynchronous Cancellation Delay in Python filelock
CVE-2026-144341: Windows Oplock Asynchronous Cancellation Delay in Python filelock Vulnerability ID: CVE-2026-144341 CVSS Score: 2.5 Published: 2026-12-04 CVE-2026-144341 (GHSA-x9cq-qqfm-8972) is a local denial-of-s
CVE-2026-144341: Windows Oplock Asynchronous Cancellation Delay in Python filelock
Vulnerability ID: CVE-2026-144341
CVSS Score: 2.5
Published: 2026-12-04
CVE-2026-144341 (GHSA-x9cq-qqfm-8972) is a local denial-of-service vulnerability affecting the Python filelock library prior to version 4.3.0 on Microsoft Windows systems. A local user account with read access to a SQLite lock database file can place a Windows Opportunistic Lock (oplock) on the database, forcing the low-level file open routine into an uninterruptible synchronous polling loop. Because AsyncReadWriteLock executes SQLite database operations inside a background worker thread via asyncio executor dispatch, task cancellations and process shutdown routines cannot interrupt the oplock wait loop, delaying coroutine termination up to the full lock acquisition timeout.
TL;DR
In filelock versions prior to 4.3.0 on Windows, a local user with read access to a SQLite lock database can use Windows opportunistic locks (oplocks) to trap worker threads in an uninterruptible polling loop, delaying AsyncReadWriteLock coroutine cancellation and application shutdown.
β οΈ Exploit Status: POC
Technical Details
- CVE ID: CVE-2026-144341 (GHSA-x9cq-qqfm-8972)
- CWE Classification: CWE-834: Excessive Iteration
- CVSS v3.1 Score: 2.5 Low (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L)
- Attack Vector: Local (Windows Opportunistic Lock on readable SQLite database)
- Affected Component: tox-dev/filelock (AsyncReadWriteLock / open_non_reparse_fd)
- EPSS Score: 0.21% (11.29th Percentile)
- Exploit Status: Regression PoC available in patch commit; not in CISA KEV
- Patched Version: filelock 4.3.0
Affected Systems
- tox-dev/filelock on Microsoft Windows
-
filelock: < 4.3.0 (Fixed in:
4.3.0)
Code Analysis
Commit: 2a7f045
Canceling an AsyncReadWriteLock acquire on Windows now ends its wait for a database oplock.
--- a/src/filelock/_read_write.py
+++ b/src/filelock/_read_write.py
@@ -555,7 +555,21 @@ def __init__(
self._fork_invalidated = False
register_fork_object(self)
with fork_transition(), _sqlite_transition():
- self._open_connection(sqlite_timeout=5.0).close()
+ self._open_waiting(5.0, cancel_check=None).close()
+
+ def _open_waiting(self, timeout: float, *, cancel_check: Callable[[], bool] | None) -> _ForkSafeConnection:
+ deadline = time.perf_counter() + timeout
+ while True:
+ try:
+ return self._open_connection(sqlite_timeout=timeout)
+ except Timeout:
+ remaining = deadline - time.perf_counter()
+ if remaining <= 0 or (cancel_check is not None and cancel_check()):
+ raise
+ time.sleep(min(remaining, _CANCEL_POLL_INTERVAL))
+ timeout = deadline - time.perf_counter()
+ if timeout <= 0:
+ raise
--- a/src/filelock/_windows.py
+++ b/src/filelock/_windows.py
@@ -334,7 +334,7 @@ def _release(self) -> None:
- def open_non_reparse_fd(path: str, mode: int, *, oplock_wait: float) -> int | None:
+ def open_non_reparse_fd(path: str, mode: int) -> int | None:
...
- oplock_deadline = time.monotonic() + oplock_wait
- denied_probes = 0
- while True:
- if status == _STATUS_ACCESS_DENIED:
- if denied_probes >= _ACCESS_DENIED_PROBES:
- break
- denied_probes += 1
- elif status == _STATUS_OPLOCK_BREAK_IN_PROGRESS:
- if time.monotonic() >= oplock_deadline:
- break
- else:
+ for _ in range(_ACCESS_DENIED_PROBES):
+ if status != _STATUS_ACCESS_DENIED:
break
time.sleep(_ACCESS_DENIED_RETRY)
handle, status = _nt_open(path, read_only=read_only, owner_only=owner_only)
Exploit Details
- GitHub: Official regression test suite demonstrating Windows oplock delay against AsyncReadWriteLock task cancellation.
Mitigation Strategies
- Upgrade tox-dev/filelock to version 4.3.0 or later to enable periodic asynchronous cancellation checks during database open contention.
- Restrict Windows DACL permissions on SQLite lock database files and parent directories so that unprivileged local accounts cannot open read handles or request opportunistic locks.
- Avoid storing SQLite lock databases in shared multi-user directories such as global temporary folders without per-user ACL isolation.
- Configure conservative, bounded lock timeout values on AsyncReadWriteLock acquisition calls rather than relying solely on outer asyncio task cancellation deadlines.
Remediation Steps:
- Identify all Python environments and project dependency manifests (requirements.txt, pyproject.toml, Pipfile) referencing filelock versions below 4.3.0 on Windows hosts.
- Run
pip install --upgrade "filelock>=4.3.0"to install the patched release. - Audit existing SQLite lock database files (.db) on Windows file systems using
icaclsto verify that non-owner accounts do not hold read permissions. - Restart long-running Python services utilizing AsyncReadWriteLock to ensure the updated library is loaded into memory.
References
- GitHub Security Advisory GHSA-x9cq-qqfm-8972
- GitHub Pull Request #1059
- GitHub Fix Commit 2a7f045f0e000e9e554f07ab6aebd4c3adbbda22
- GitHub Release Tag 4.3.0
- Official CVE.org Record for CVE-2026-144341
- National Vulnerability Database (NVD) Entry for CVE-2026-144341
- CVEListV5 Repository JSON Record
- Wiz Vulnerability Database Entry for CVE-2026-144341
Read the full report for CVE-2026-144341 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.