Skip to main content

filelock CVE-2026-112934

| EUVDEUVD-2026-105023 MEDIUM
UNIX Hard Link (CWE-62)
2026-10-20 GitHub_M
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local account with lock-dir rename access
  2. Exploit
    Replace holder record with FIFO or hard link
  3. Execution
    Victim heartbeat/record write follows planted name
  4. Impact
    Stall 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

filelock 4.0.0, < 4.2.1

Affected Packages

euvd filelock fix: 4.2.1

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

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H
vuln.today AI 6.1 MEDIUM

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).

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
High

Lifecycle Timeline

2
Patch available
Oct 20, 2026 - 16:02 EUVD
CVE Published
Oct 20, 2026 - 14:30 cve.org
MEDIUM 6.1

DescriptionCVE.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

EPSS Score
0.1%
Top 98% exploitable
Prevalence
High
ubiquitous Python library, but vulnerable SoftReadWriteLock is a newer 4.0.0+ feature
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0
CVE-2026-112940 HIGH
7.1 Oct 20

filelock's SQLite-backed ReadWriteLock (versions 3.20.4 through 4.2.0) can be tricked into overwriting or unlinking the

CVE-2026-112911 MEDIUM
6.3 Oct 20

The Python `filelock` package's opt-in `StrictSoftFileLock` (3.30.0 through <4.2.1) and `SoftReadWriteLock` (4.0.0 throu

CVE-2026-112936 MEDIUM
6.1 Oct 20

Symlink redirection in filelock's ReadWriteLock and AsyncReadWriteLock (versions 3.20.4 through 4.0.8) allows a local us

CVE-2026-112909 MEDIUM
6.1 Oct 20

Python filelock's UnixFileLock truncates a regular file that a second local user has renamed onto the lock path (or hard

CVE-2026-112937 MEDIUM
6.1 Oct 20

A time-of-check-to-time-of-use (TOCTOU) flaw in the Python filelock library's ReadWriteLock, present from 4.1.0 through

CVE-2026-112915 MEDIUM
5.5 Oct 20

Local denial of service in the Python `filelock` package (versions 3.20.4 through 4.2.0) allows a second local account t

CVE-2026-112914 MEDIUM
5.3 Oct 20

A local, low-privileged user (PR:L) who can rename files in a shared, non-sticky-bit lock directory can abuse the Python

CVE-2026-22701 MEDIUM
5.3 Jan 10

Python's filelock SoftFileLock implementation prior to version 3.20.3 contains a TOCTOU race condition that allows local

CVE-2026-112939 MEDIUM
4.7 Oct 20

SoftFileLock, MarkerSoftFileLock, and SoftFileLease in the Python filelock package from 3.22.0 through 4.2.0 can be tric

CVE-2026-112935 MEDIUM
4.7 Oct 20

The Python filelock library (versions 3.22.0 through 4.2.0) can admit two simultaneous lock holders because its SoftFile

CVE-2026-112906 MEDIUM
4.7 Oct 20

Python's filelock library, versions 4.1.0 through 4.2.0, allows a local attacker who is already contending on the same l

CVE-2026-112941 LOW
3.3 Oct 20

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-

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy