Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112914 Overview
CVE-2026-112914 affects filelock, a platform-independent file lock library for Python maintained by tox-dev. The flaw exists in SoftFileLock between versions 4.1.0 and 4.2.1. A local attacker with rename access in a non-sticky lock directory can swap a stale marker with a symbolic link. When the lock holder restores the marker by name, the runtime follows the link and hard-links one of the lock user's files into the lock directory. This creates a hard link attack primitive against the holder process. The issue is resolved in version 4.2.1.
Critical Impact
A co-located local user can coerce the lock-holding process to hard-link arbitrary files it owns into the lock directory, enabling integrity attacks against the holder.
Affected Products
- tox-dev filelock versions 4.1.0 through 4.2.0
- Python applications using SoftFileLock, MarkerSoftFileLock, or SoftFileLease
- Multi-tenant Linux and macOS environments sharing non-sticky lock directories
Discovery Timeline
- 2026-10-20 - CVE-2026-112914 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-112914
Vulnerability Analysis
The vulnerability is a symbolic link following flaw [CWE-59] combined with a race condition in stale marker handling [CWE-363]. SoftFileLock uses on-disk marker files to signal lock ownership. When a contender detects a stale marker, it moves the marker aside and later restores it by name. During this window, an attacker with write access to the lock directory can replace the moved-aside path with a symlink pointing to one of the lock user's own files. The restore operation follows the symlink and performs a same-filesystem hard link, placing the targeted file inside the lock directory under the holder's credentials.
Root Cause
The root cause is twofold. First, the stale-break code path did not maintain the invariant that the lock path was never empty while the contender inspected the marker it had moved. Second, the restoration logic followed symlinks encountered under the break name instead of refusing to traverse them. On ext4 and similar filesystems, freed inode numbers assigned to successor markers compounded the confusion, letting the stale-break logic misidentify a live holder's marker as its own.
Attack Vector
Exploitation requires local access, write and rename permissions on the lock directory, and a race window during a stale-break operation. The attack vector is local with high attack complexity and low privileges. The attacker observes a SoftFileLock contender moving a stale marker aside, replaces the vacated path with a symlink to a target file owned by the lock user, and waits for the holder to restore the marker. The runtime follows the symlink and creates a hard link in the lock directory. Confidentiality impact is limited but integrity impact is high because the attacker influences file placement under another user's authority.
Fix :class:`~filelock.SoftFileLock`, :class:`~filelock.MarkerSoftFileLock`
and :class:`~filelock.SoftFileLease` removing or displacing a live holder's
marker in five cases. ext4 gave a freed inode number to the next marker. A
stalled :class:`~filelock.FileLock` removed its ``ENOSYS`` placeholder after
a peer replaced it. A failed acquire cleaned up after a successor took the
path. A stale break left the lock path empty while it checked the marker it
had moved. A ``lifetime`` break judged a marker by a reused inode number.
On Linux and macOS a stale marker now changes hands in one atomic exchange.
Restoring a marker no longer follows a symlink found under the break name.
Source: GitHub Commit 740ff66
Detection Methods for CVE-2026-112914
Indicators of Compromise
- Unexpected symbolic links appearing in SoftFileLock directories, particularly under marker break names
- Hard links in lock directories pointing to files outside the application's expected scope
- filelock package versions 4.1.0 through 4.2.0 present in Python environment manifests (pip freeze, requirements.txt, SBOMs)
Detection Strategies
- Inventory Python dependencies across build and runtime environments to flag vulnerable filelock releases
- Audit lock directory locations for world-writable or group-writable paths lacking the sticky bit (chmod +t)
- Monitor filesystem telemetry for rename() and symlink() syscalls targeting known application lock paths from unexpected UIDs
Monitoring Recommendations
- Enable file integrity monitoring on directories used by SoftFileLock-based applications
- Alert on symlink creation inside lock directories where the symlink owner differs from the lock-holding process owner
- Correlate repeated stale-break events with concurrent rename activity by unprivileged local accounts
How to Mitigate CVE-2026-112914
Immediate Actions Required
- Upgrade filelock to version 4.2.1 or later across all Python environments
- Relocate SoftFileLock directories to paths owned exclusively by the lock-using account
- Apply the sticky bit to any shared parent directory hosting lock files to prevent cross-user rename
- Review applications that select lock paths from user-controlled configuration for exposure
Patch Information
The fix is contained in GitHub Pull Request #843 and shipped in filelock 4.2.1. On Linux and macOS the patched code performs stale marker handoff via a single atomic exchange, keeping the lock path non-empty throughout. The restoration path no longer follows symlinks found under the break name. See GHSA-crv4-6mhj-j5jh for the full advisory.
Workarounds
- Place lock directories on a filesystem path writable only by the lock user until patching is complete
- Use FileLock (OS-level locking) instead of SoftFileLock where the underlying filesystem supports it
- On NFS and SMB deployments where atomic exchange is unavailable, rely on timeout or explicit break_lock() calls rather than automatic stale breaks
# Upgrade filelock to the patched release
pip install --upgrade 'filelock>=4.2.1'
# Verify the installed version
python -c "import filelock; print(filelock.__version__)"
# Harden a shared lock directory with the sticky bit
chmod 1777 /var/lock/myapp
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

