Time-of-check Time-of-use (TOCTOU) Race Condition in filelock - CVE-2026-112941
Published: November 2, 2026
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.