Time-of-check Time-of-use (TOCTOU) Race Condition in filelock - CVE-2026-112937

 

Time-of-check Time-of-use (TOCTOU) Race Condition in filelock - CVE-2026-112937

Published: November 2, 2026


Vulnerability identifier: #VU158681
CSH Severity: Low
CVSS v4: 6.9 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-112937
CWE-ID: CWE-367
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to delete another user's directory trees with that user's permissions and cause a limited denial of service.

The vulnerability exists due to a time-of-check time-of-use weakness in filelock's ReadWriteLock and AsyncReadWriteLock when recursively deleting private hard-link directories without verifying their identity. A local user can rename eligible directories onto remembered .filelock-* paths or forge dead-owner directory names in a writable shared parent to trigger deletion with the lock user's permissions. A deeply nested forged directory can also cause initial lock construction to fail on Python 3.11.


Affected software

filelock

How to mitigate CVE-2026-112937

Install security update from vendor's website.

filelock - update to 4.2.1

External References

Related Security Bulletins