Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local account with lock-dir rename access
-
ExploitReplace holder record with FIFO or hard link
-
ExecutionVictim heartbeat/record write follows planted name
-
ImpactStall lock (DoS) or write through attacker-chosen file
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling UNIX hard link following
|
| Exploitation Conditions | Requires: (1) a local account on the same host as the victim; (2) rename or write access to the SoftReadWriteLock directory - specifically an account with the same effective UID as the lock holder or ownership/write access to the parent, letting the attacker rename records over '<path>.rw', 'gen', or 'holders'; (3) the target application must use filelock's SoftReadWriteLock on an affected version (4.0.0 through 4.2.0); and (4) for the write-through (hard-link) variant, a permissive hard-link policy (e.g. fs.protected_hardlinks disabled) so a link to a reachable target file succeeds. Limiting factors: there is no network vector and no unauthenticated path - the attacker must already be a local, authenticated user sharing the lock directory; the FIFO-stall variant yields only denial of the lock, and the higher-impact write-through variant additionally needs the permissive hard-link configuration, making realistic risk confined to shared/multi-tenant UNIX hosts rather than single-user or isolated deployments. |
| Impact | This is a locally-exploitable, medium-severity issue, not a remote-critical one. The provided CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H, score 6.1) tells a consistent story with the description: an attacker needs an existing local account (PR:L) with rename access to the shared lock directory - not network reach. No EPSS score was supplied, no CISA KEV listing is present, and no public exploit code is referenced, so by the precision rules this is 'no public exploit identified at time of analysis.' All three real-world exploitation signals (EPSS/KEV/POC) are therefore absent or silent, which argues against treating this as an urgent, widely-weaponized threat. The impact split is also telling: confidentiality is N (so the 'Information Disclosure' tag conflicts with the vector - see data_quality_flags), the real impact is integrity (I:L, attacker-planted hard link causes the victim to write through a chosen file) and availability (A:H, a named pipe stalls the lock holder). Net assessment: a legitimate but low-priority hardening fix for multi-tenant/shared-host Python deployments using SoftReadWriteLock; it is not a high-CVSS-but-no-substance issue, but neither is it a drop-everything priority given the local, authenticated, shared-directory precondition and absence of any exploitation evidence. |
| Exploit ScenarioDerived | On a shared multi-user host where a Python application uses filelock's SoftReadWriteLock against a lock directory writable by another local account, a malicious user with rename access replaces a holder record with a named pipe (FIFO) so the victim's heartbeat blocks and the lock stalls, or under a permissive hard-link policy links a sensitive target file over the record so the victim writes through it and corrupts it. No public proof-of-concept is referenced in the available data; exploitation requires an existing local foothold rather than any remote access. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 20, 2026
SoftReadWriteLock in the Python filelock package (4.0.0 through 4.2.0) refreshes holder records by pathname without verifying that the name still resolves to the file it originally created, so a local user who can rename entries in the lock directory can substitute a named pipe (FIFO) and stall the lock, or - where the hard-link policy is permissive - link a file the victim can reach and cause the lock holder to write through it. Exploitation requires an authenticated local account sharing the lock directory (CVSS PR:L, AV:L), so this is a locally-exploitable, medium-severity issue (CVSS 6.1, integrity low, availability high) rather than a remote one; no public exploit code was identified at time of analysis and the flaw is fixed in filelock 4.2.1.
RemediationAI
Upgrade to filelock 4.2.1, which is the vendor-released patch for this issue; the fix is tracked in PR https://github.com/tox-dev/filelock/pull/842 and commit https://github.com/tox-dev/filelock/commit/bfa066d65a1ba9106f86ee9d027f7588b9c77e03 and documented in advisory GHSA-fj95-fr6c-h845. Because this is a dependency-level fix, rebuild container images and refresh lockfiles so transitive consumers of filelock also resolve to 4.2.1. If upgrading is not immediately possible, the most effective compensating control is to tighten ownership and permissions on the lock directory and its parent so only the legitimate lock-holding account can rename entries (e.g. 0700, mode 0o600 records); the trade-off is that genuinely shared multi-user lock paths must be redesigned, since the vulnerability is precisely the shared-directory scenario. On Linux, keep fs.protected_hardlinks enabled (the default) to block the write-through variant, accepting that this is a host-wide setting which some legacy workloads rely on disabling. Avoid placing lock paths on world- or group-writable volumes or on directories shared with untrusted local users, and monitor the lock directory for FIFOs or unexpected link counts, noting that such monitoring is detective only and does not prevent the denial-of-lock condition.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
filelock is a platform-independent file locking library for Python, and SoftReadWriteLock implements a lease-based read/write protocol using on-disk state under a lock path: a '<path>.rw' directory containing 'gen' and 'holders' records, with a heartbeat thread periodically rewriting the holder record to prove liveness. The root cause is CWE-62 (UNIX hard link) coupled with a name-based time-of-check/time-of-use gap: the heartbeat's overwrite operation reopened the holder record purely by name, so a second local account with rename access to the lock directory could swap that record for a FIFO - the open then blocks and the lease stalls - or create a hard link to a reachable target file so the victim's rewrite lands in the attacker-chosen file. The 4.2.1 fix (PR #842, commit bfa066d65a1ba9106f86ee9d027f7588b9c77e03) makes Files.create return the kernel's device and inode identity, requires that identity to be passed to overwrite, and rejects the write when the name no longer leads to the originally created file. It also opens '<path>.rw' and 'gen'/'holders' via dir_fd without following symlinks (and refuses Windows junctions) so a swapped-in tree cannot redirect writes, opens records non-blocking so a FIFO cannot stall the heartbeat, and raises TreeReplacedError so a live lock reports the hold lost rather than killing the heartbeat thread.
Know when Filelock gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H
Local co-tenant with rename access to the lock directory means AV:L and PR:L; no confidentiality impact (C:N), attacker-controlled write-through gives I:L, and the FIFO stall denies the lock (A:H).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
filelock is a platform-independent file lock for Python. From 4.0.0 until 4.2.1, SoftReadWriteLock refreshes holder records by name, allowing another local user with rename access to the lock directory to replace a record with a named pipe and stall the lock, or under a permissive hard-link policy to link a reachable target file and cause the lock user to write through it. This issue is fixed in version 4.2.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
filelock's SQLite-backed ReadWriteLock (versions 3.20.4 through 4.2.0) can be tricked into overwriting or unlinking the
The Python `filelock` package's opt-in `StrictSoftFileLock` (3.30.0 through <4.2.1) and `SoftReadWriteLock` (4.0.0 throu
Symlink redirection in filelock's ReadWriteLock and AsyncReadWriteLock (versions 3.20.4 through 4.0.8) allows a local us
Python filelock's UnixFileLock truncates a regular file that a second local user has renamed onto the lock path (or hard
A time-of-check-to-time-of-use (TOCTOU) flaw in the Python filelock library's ReadWriteLock, present from 4.1.0 through
Local denial of service in the Python `filelock` package (versions 3.20.4 through 4.2.0) allows a second local account t
A local, low-privileged user (PR:L) who can rename files in a shared, non-sticky-bit lock directory can abuse the Python
Python's filelock SoftFileLock implementation prior to version 3.20.3 contains a TOCTOU race condition that allows local
SoftFileLock, MarkerSoftFileLock, and SoftFileLease in the Python filelock package from 3.22.0 through 4.2.0 can be tric
The Python filelock library (versions 3.22.0 through 4.2.0) can admit two simultaneous lock holders because its SoftFile
Python's filelock library, versions 4.1.0 through 4.2.0, allows a local attacker who is already contending on the same l
Symlink or junction replacement of the `<path>.rw` lock tree in Python's filelock 4.1.0 through 4.2.0 lets a second, co-
EUVD-2026-105023
NVD
CVE.org
EPSS
GitHub
Exploit-DB