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