The ReadWriteLock and AsyncReadWriteLock components in filelock versions 3.20.4 through 4.2.0 use SQLite databases for locking, but SQLite reopens the lock database by name, following symlinks and acting on side files such as -journal, -wal, and -shm. This behavior allows a local attacker with write permissions in the directory containing the lock database to manipulate these files, causing the lock user to write arbitrary data into their own files or cause denial of service. The vulnerability requires a directory without the sticky bit and allows actions such as file creation, unlinking, or causing lock acquisition failures. The CVSS 3.1 score is 7.1 (High), with local low-privilege attacker impact on integrity and availability but no confidentiality impact.
A vulnerability in the filelock library versions 3.22.0 through 4.2.0 allows a local user with write access to a lock marker file to forge the process ID (PID) recorded in the marker. This causes another process, running as the same user or root, to incorrectly consider the lock stale, remove the live marker, and acquire the lock simultaneously. This results in two processes concurrently entering a critical section without error, potentially causing integrity issues. The vulnerability requires specific conditions related to file permissions and directory sticky bits and has a CVSS score of 4.7 (Medium).
A vulnerability in filelock versions 3.30.0 through 4.2.0 allows a local user with write access to a shared directory to swap a symbolic link in place of a lock coordination directory during a race window. This causes the lock user's process to create claim files in a directory chosen by the attacker but writable only by the lock user. The main impact is denial of service on other strict locks held by the lock user, requiring manual intervention to force-break stranded locks.
The ReadWriteLock and AsyncReadWriteLock classes in PyTorch versions 2.11.0 through 2.14.0 follow symlinks when resolving lock file paths and pass them to SQLite without preventing symlink usage. This allows a local attacker with write access to the lock directory to cause the victim process to create or lock files at attacker-chosen locations, potentially breaking mutual exclusion and corrupting protected resources. The issue affects Linux, macOS, and Windows 11. A fix is available in PyTorch 2.14.1.
A vulnerability in filelock versions 3.22.0 through 4.2.0 allows a local user to cause two processes to hold the same soft file lock simultaneously by exploiting inode reuse and stale lock file handling. This occurs on filesystems like ext4 and xfs that reuse inode numbers immediately after file deletion, combined with a sticky shared directory where an unprivileged user can create and unlink files. The flaw leads to a high integrity impact as concurrent holders can write protected data without detection, though confidentiality and availability are unaffected.
CVE-2026-112934 describes a vulnerability in the filelock library versions 4.0.0 through 4.2.0 where the SoftReadWriteLock mechanism refreshes its holder record by reopening and writing to a file without verifying the file type. A local attacker who owns the lock's .rw directory can exploit this by replacing the holder record with a FIFO (named pipe) or a hard link, causing the lock user's write operations to hang or overwrite parts of its own files. This leads to a denial of service where the lock holder's heartbeat thread stalls and the lock state becomes inconsistent, allowing multiple processes to believe they hold the write lock simultaneously. The issue requires local access and specific filesystem conditions, such as permissive hard-link policies on Linux or ownership of the lock directory in a sticky or writable directory.
The filelock library's ReadWriteLock and AsyncReadWriteLock use an SQLite-backed lock database that runs PRAGMA journal_mode=MEMORY on each acquire, causing SQLite to load the entire schema of the lock file. A local attacker who can place or overwrite this lock database file can cause every acquire_read or acquire_write call to stall indefinitely or hang, ignoring timeout and blocking settings. This results in a denial of service (availability impact) without affecting confidentiality or integrity. The issue affects filelock versions 3.20.4 through 4.2.0.
A symlink swap vulnerability in the filelock library's SoftFileLock writability check allows a local user with write access to the lock directory to leak one bit of information about whether a path exists and is writable by the lock user. This occurs because the check uses os.lstat followed by os.access, which follows symlinks, enabling a time-of-check to time-of-use (TOCTOU) symlink attack. The vulnerability affects filelock versions 3.32.6 through 4.2.0 and is mitigated on Linux by the fs.protected_symlinks kernel setting in sticky world-writable directories like /tmp. The impact is limited to a low-severity information leak with no integrity or availability impact.
A vulnerability in filelock's StrictSoftFileLock and SoftReadWriteLock classes allows a local unprivileged user to pre-create the protocol directory used for lock ownership state. This enables the attacker to interfere with the lock user's claims, potentially causing multiple processes to enter the same critical section simultaneously, leading to integrity and availability impacts. The issue affects filelock versions 3.30.0 through 4.2.0 and requires the attacker to create the directory before the lock user's first acquire on that path, typically in shared sticky directories like /tmp. The vulnerability has no confidentiality impact but can cause high integrity and availability damage.
UnixFileLock, used by FileLock and AsyncFileLock on Unix, truncates and changes permissions of any regular file that another local user renames or hard-links onto the lock path. This can cause unintended data loss and allow the other user to read and modify the file contents if a permissive mode is set. The vulnerability affects filelock releases up to and including 4.2.0 and requires specific conditions related to directory permissions and kernel settings. The issue is rated medium severity with CVSS 6.1 and has been fixed in version 2.1.2 of the affected product.
The filelock library versions 3.30.0 through 4.2.0 have a vulnerability in StrictSoftFileLock and AsyncStrictSoftFileLock where claim directories are created without applying the intended restrictive mode, resulting in directories with permissions influenced by the process umask or parent directory ACL. This can allow another local user with write access to the claim directory to remove claim files, causing multiple holders to believe they hold the lock simultaneously, leading to integrity issues. The vulnerability requires specific environment conditions such as a permissive umask or default ACL and a local attacker with an account on the same host. The CVSS score is 5.3 (medium severity) with no confidentiality impact but high integrity impact.
Virtualenv versions prior to 1.2.2_1 and 2.5.1_1 have a vulnerability where files copied from a cached app-data directory retain file permissions from the cache rather than applying the current environment's umask. This can result in files with overly permissive access rights in new environments if the cache was created with a permissive umask, potentially allowing other local users to modify files such as pip scripts. The issue arises because shutil.copy preserves the source file mode, overriding the current umask. A fix is available in versions 1.2.2_1 and 2.5.1_1, which enforce stricter file permissions when copying from the cache.