CVE-2026-112941 is a local integrity vulnerability in filelock versions 4.1.0 through 4.2.0 involving SoftReadWriteLock. A local user with write access to the lock's parent directory can replace the lock directory tree with symbolic links after the lock's initial acquire, causing the lock user process to write lock records through these links. This results in unintended file modifications in directories writable by the lock user, such as breaking a git repository's functionality. The vulnerability has low severity with no confidentiality or availability impact.
The filelock ReadWriteLock and AsyncReadWriteLock components use SQLite to manage locks by reopening lock database files by name, which allows a local attacker with write access to the lock directory to plant symlinks or journal files. This can cause the lock user’s process to write attacker-controlled data into the lock user's files, create or unlink files, or cause lock acquisition failures. The vulnerability affects filelock versions 3.20.4 through 4.2.0, with fixed versions starting at 21.14.10. The issue requires a writable directory without the sticky bit and a local attacker with an account on the same host. The CVSS score is 7.1 (High).
A vulnerability in filelock versions 3.22.0 through 4.2.0 allows a local user with write access to a lock marker file (but without permission to remove it) to forge the lock holder's process ID. This causes the lock to be incorrectly considered stale, enabling two processes to hold the lock simultaneously and potentially corrupt shared data. The issue arises when the lock marker file is created with group or other write permissions, typically due to an explicit permissive mode or a lax umask in a sticky or non-removable directory. The vulnerability has a CVSS score of 4.7 (Medium) and is fixed in version 21.14.10.
A race condition in the StrictSoftFileLock and AsyncStrictSoftFileLock implementations allows a local user with write permissions to rename the <path>.filelock directory to a symbolic link after an lstat check but before subsequent operations. This can cause the lock user to create claim files in an attacker-chosen directory, potentially disrupting other locks by causing stranded claims that lead to denial of service until manually cleared. The vulnerability affects filelock versions from 3.30.0 up to and including 4.2.0 and requires local access with write permissions on the shared directory without a sticky bit or specific conditions in sticky directories. The CVSS 3.1 score is 5.8 (Medium).
The filelock library versions 4.1.0 through 4.2.0 contain a vulnerability in the ReadWriteLock and AsyncReadWriteLock mechanisms where private .filelock-* directories are removed without verifying the directory's identity. This allows a local user with write permission on the lock database's parent directory (without sticky bit protection) to rename a directory onto the lock's .filelock-* link, causing the lock user's process to recursively delete that directory tree with the lock user's permissions. This issue affects macOS since version 4.1.1 and POSIX environments without a usable /proc/self/fd, such as chroot or containers without /proc mounted. The vulnerability has a CVSS 3.1 score of 6.1 (Medium) and does not impact confidentiality but can cause high integrity damage and partial availability loss.
The ReadWriteLock and AsyncReadWriteLock classes in virtualenv versions >=20.37.0 and <21.14.3 resolve the lock file path following symlinks and pass it to SQLite without refusing symlinks. This allows a local attacker with write access to the lock directory to plant a symlink that causes the victim process to create or lock files at unintended locations, potentially breaking mutual exclusion and causing resource corruption. The issue is fixed in version 21.14.3.
filelock versions 3.22.0 through 4.2.0 contain a vulnerability in their stale-lock break mechanism for SoftFileLock and related locks. The flaw allows a local user with write access to the lock directory (e.g., a sticky /tmp) to cause two processes of the lock user to simultaneously hold the same lock by exploiting inode reuse and race conditions. This results in a high integrity impact where two holders can write protected data concurrently without detection. The vulnerability requires local access and a specific filesystem behavior (ext4, xfs, overlayfs).
The SoftReadWriteLock mechanism in filelock versions 4.0.0 through 4.2.0 has a vulnerability where it 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 private files. This can lead to a denial of service where the lock user hangs indefinitely and two processes 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 default macOS/BSD behavior. The vulnerability has a CVSS score of 6.1 (Medium) and is fixed in filelock version 21.14.10.
A vulnerability in filelock's ReadWriteLock and AsyncReadWriteLock allows a local unprivileged user who can place or overwrite the lock database file to cause every acquire operation to stall or hang indefinitely, ignoring timeout and blocking parameters. This is due to SQLite loading the entire schema on each acquire, which can be exploited by a crafted database file. The impact is limited to availability, with no confidentiality or integrity compromise. Affected versions are filelock 3.20.4 through 4.2.0. The vulnerability requires the attacker to have write access to the lock file path, typically in a non-sticky shared directory or a writable database owned by the lock user. The issue is patched in version 21.14.10.
A vulnerability in filelock versions 4.1.0 through 4.2.0 allows a local unprivileged user to exploit a race condition in the soft-lock stale break restore process. By replacing a lock file marker with a symbolic link in a writable, non-sticky shared directory, the attacker can cause the lock user to create a hard link to one of their own files. This exposes file metadata and allows the attacker to manipulate the file's name. In version 4.2.0, this can lead to truncation of the file by the lock user's subsequent FileLock operation. The vulnerability requires specific conditions including a writable non-sticky directory shared between users and CPython 3.12 or later on Linux or macOS.
A symlink swap vulnerability in filelock's SoftFileLock writability check allows a local user 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) leak. The vulnerability affects filelock versions 3.32.6 through 4.2.0 and is mitigated by Linux's fs.protected_symlinks setting in common sticky world-writable directories like /tmp. The CVSS score is low (2.5) due to high attack complexity and limited information leakage.
A vulnerability in the filelock library versions 3.30.0 through 4.2.0 allows a local unprivileged user to pre-create a lock protocol directory in a shared sticky directory (e.g., /tmp). This causes the lock implementation to adopt the directory owned by the attacker, enabling them to interfere with lock claims and potentially cause multiple processes to enter critical sections simultaneously. The issue affects StrictSoftFileLock and SoftReadWriteLock classes, leading to integrity and availability impacts such as unauthorized writes and denial of service via CPU or memory exhaustion. The vulnerability requires the attacker to win initial ownership of the protocol directory before the legitimate user acquires the lock. A fix is available in version 21.14.10 of the virtualenv product.
UnixFileLock, used by FileLock and AsyncFileLock on Unix systems, truncates and can change permissions of any regular file that another local user renames or hard-links onto the lock path. This occurs because UnixFileLock empties the file it finds at the lock path once it acquires the lock and applies an explicit mode if specified. An attacker with local access and the ability to rename or hard-link files in certain directories can cause the lock user to inadvertently truncate and expose files to unauthorized read/write access. The vulnerability affects all filelock releases up to and including 4.2.0 and has a CVSS score of 6.1 (medium severity). A fix is available in version 21.14.10.
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 that may be writable by other local users under certain umask or ACL configurations. This allows another local user with write permissions on the claim directory to remove claim files, causing multiple holders to believe they hold the lock simultaneously, leading to integrity issues. The vulnerability requires local access and specific environment conditions such as a permissive umask or default ACL. The issue is fixed in version 21.14.10 of the affected product virtualenv.
A vulnerability in filelock versions 4.1.0 through 4.2.0 allows a local unprivileged user to evict a fresh lock file owned by another user by exploiting inode reuse and coarse clock timestamp manipulation on ext4 or overlayfs filesystems. This causes two processes of the lock owner to enter a critical section simultaneously, violating lock integrity without affecting confidentiality or availability. The attack requires specific timing conditions and filesystem behavior, making it complex to exploit.
A vulnerability in virtualenv prior to version 21.7.11 allows an attacker who can influence prompt input to inject configuration lines into the pyvenv.cfg file. This occurs because prompt values are written verbatim without sanitizing line boundaries, enabling injection of additional keys that can alter environment metadata or base interpreter selection. The issue requires attacker control of prompt input from outside the operator's trust boundary to have security impact. The flaw is fixed in version 21.7.11.
virtualenv versions from 20.4.3 up to but not including 21.7.12 do not verify the integrity of downloaded pip and setuptools seed wheels before use. This allows an attacker who can compromise the package index, mirror, or intercept TLS connections to substitute malicious wheels, which virtualenv then caches and seeds into new environments. The issue is fixed in version 21.7.12.
virtualenv versions prior to 21.7.14 contain a vulnerability in their bash, zsh, and fish activation scripts where improperly quoted environment paths can lead to command execution when the activation script is sourced. This occurs due to surplus quoting that allows shell metacharacters to be interpreted as commands, potentially executing arbitrary code with the user's privileges. The issue is fixed in version 21.7.14.
virtualenv versions from 20.4.3 up to but not including 20.36.1 contain TOCTOU vulnerabilities in directory creation. These race conditions allow local attackers to perform symlink-based attacks by exploiting the timing between directory existence checks and creation. This can redirect app_data and lock file operations to attacker-controlled locations. The issue is patched in version 20.36.1.
CVE-2026-22701 is a Time-of-Check-Time-of-Use (TOCTOU) race condition vulnerability in the SoftFileLock class of the filelock package used by virtualenv. It allows a local attacker with permission to create symlinks to exploit a race window between permission checking and file creation, potentially causing lock acquisition failures, denial of service, or unintended file operations. The vulnerability affects applications using SoftFileLock or fallback FileLock on systems without fcntl support. A patch adding the O_NOFOLLOW flag to prevent symlink following during lock file creation is available in version 20.36.1. Users are advised to upgrade or apply mitigations such as avoiding SoftFileLock in sensitive contexts and restricting filesystem permissions.