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

 

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

Published: November 2, 2026


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

Vulnerability details

The vulnerability allows a local user to create, overwrite, and delete files with lock-protocol names in directories writable by another user running the lock.

The vulnerability exists due to a time-of-check time-of-use gap in the directory validation performed by SoftReadWriteLock and AsyncSoftReadWriteLock when reusing a previously validated lock tree. A local user can replace a controllable lock tree or its subdirectories with symbolic links after validation to redirect subsequent file creation, replacement, and deletion operations into directories writable by the lock-running user.

Written content is limited to filelock's own lock records rather than user-selected bytes.


Affected software

filelock

How to mitigate CVE-2026-112941

Install security update from vendor's website.

filelock - update to 4.2.1

External References

Related Security Bulletins