CVE-2026-144387: CVE-2026-144387: Local Denial of Service via Unbounded Generation Log Probing in Python filelock
CVE-2026-144387: Local Denial of Service via Unbounded Generation Log Probing in Python filelock Vulnerability ID: CVE-2026-144387 CVSS Score: 3.3 Published: 2026-12-04 CVE-2026-144387 (GHSA-j77v-qg7h-37qr) is an al
CVE-2026-144387: Local Denial of Service via Unbounded Generation Log Probing in Python filelock
Vulnerability ID: CVE-2026-144387
CVSS Score: 3.3
Published: 2026-12-04
CVE-2026-144387 (GHSA-j77v-qg7h-37qr) is an algorithmic denial-of-service vulnerability affecting the Python filelock package prior to version 4.3.0. A local attacker with write access to a SoftReadWriteLock or AsyncSoftReadWriteLock generation directory can continuously append valid snapshot records, trapping lock contenders in an unbounded probing loop that bypasses configured acquisition timeouts and consumes excessive CPU resources.
TL;DR
An unbounded probing loop in filelock's SoftReadWriteLock generation log mechanism allows a local user with write access to the lock directory to bypass acquisition timeouts and trigger excessive CPU utilization. Upgrade to filelock 4.3.0 or later to resolve the issue.
Technical Details
- CVE / GHSA ID: CVE-2026-144387 / GHSA-j77v-qg7h-37qr
- Weakness Class: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
- CVSS v3.1 Score: 3.3 (LOW) - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
- Affected Component: filelock (SoftReadWriteLock / AsyncSoftReadWriteLock GenerationLog)
- Attack Vector: Local filesystem write access to the lock generation directory (gen/)
- Primary Impact: Acquisition timeout overrun and local CPU exhaustion (Denial of Service)
- EPSS / KEV Status: 0.28% (21.51st Percentile) / Not Listed in CISA KEV
- Patched Version: filelock 4.3.0
Affected Systems
- tox-dev/filelock (PyPI: filelock)
-
filelock: < 4.3.0 (Fixed in:
4.3.0)
Code Analysis
Commit: 6f0f71d
Bound SoftReadWriteLock generation log probe and release retries (#981)
diff --git a/src/filelock/_soft_rw/_protocol.py b/src/filelock/_soft_rw/_protocol.py
index 310946ec1..bb675d867 100644
--- a/src/filelock/_soft_rw/_protocol.py
+++ b/src/filelock/_soft_rw/_protocol.py
@@ -246,9 +246,11 @@ class GenerationLog:
def _probe(self, start: Snapshot, patience: int = _RETAINED_GENERATIONS) -> Snapshot:
latest = start
generation = start.generation
+ limit = generation + 2 * _RETAINED_GENERATIONS
gap = 0
- while gap < patience:
+ # A writer can keep adding records; the caller checks its deadline only after this probe returns.
+ while gap < patience and generation < limit:
generation += 1
if (snapshot := self._read(generation)) is None:
gap += 1
Mitigation Strategies
- Upgrade the Python filelock package to version 4.3.0 or later to enforce bounded generation log scanning and release deadlines.
- Isolate lock directories from untrusted local accounts by placing lock files in directories with restrictive permissions (chmod 0700 or 0750).
- Avoid creating SoftReadWriteLock or AsyncSoftReadWriteLock instances directly within shared world-writable directories such as /tmp or /var/tmp.
Remediation Steps:
- Identify all Python environments, virtualenvs, and container images using filelock versions prior to 4.3.0 (
pip show filelock). - Update dependency specifications in requirements.txt, pyproject.toml, or Poetry/Pipfile lockfiles to require
filelock>=4.3.0. - Deploy the updated package via
pip install --upgrade "filelock>=4.3.0". - Audit application exception handling around
SoftReadWriteLock.release()andAsyncSoftReadWriteLock.release()to account for potentialSoftFileLockProtocolErrorexceptions under extreme contention. - Verify filesystem permissions on directories hosting
.lockfiles andgen/folders to ensure non-privileged local users cannot write arbitrary generation snapshots.
References
- GitHub Security Advisory: GHSA-j77v-qg7h-37qr
- GitHub Pull Request #981: Fix SoftReadWriteLock probe bounds
- GitHub Fix Commit: 6f0f71da7a85346c59176371054cfc9718e492e8
- GitHub Release: filelock v4.3.0
- NVD Vulnerability Detail: CVE-2026-144387
- CVE.org Official Record: CVE-2026-144387
- CVEProject V5 JSON Record: CVE-2026-144387
- Wiz Vulnerability Database: CVE-2026-144387
Read the full report for CVE-2026-144387 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.