Skip to main content

filelock CVE-2026-112936

| EUVDEUVD-2026-105026 MEDIUM
Improper Link Resolution Before File Access (CWE-59)
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 write access to shared lock directory
  2. Delivery
    Plant symlink at expected lock-database path
  3. Exploit
    Victim ReadWriteLock resolves path and passes to SQLite
  4. Execution
    SQLite follows link, opens/locks attacker-chosen target
  5. Impact
    Mutual exclusion split, locked resource corrupted

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Requires: (1) a local account on the same host as the victim - there is no network vector; (2) the ability to create names (symlink) in a lock directory that is shared with and writable before the victim creates its lock database; (3) the victim must use the newer filelock ReadWriteLock or AsyncReadWriteLock classes (introduced in 3.20.4) on versions 3.20.4 through 4.0.8 - the classic FileLock is not implicated; and (4) the attacker must plant the symlink at the database path before SQLite opens/creates it. Limiting factors: local-only access, dependence on a world-writable or shared lock directory (non-default for many deployments), and reliance on a recently added feature, all of which narrow realistic exposure well below the raw score.

Impact

This is a genuine but moderate, locally-scoped privilege/integrity issue rather than a top-priority remote threat. The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L, base 6.1 MEDIUM) is internally consistent with the description: exploitation requires a local, low-privileged account that can create names in a shared lock directory, with high integrity impact (lock redirection / broken mutual exclusion) and low availability impact, and no confidentiality impact. No EPSS score, CISA KEV entry, POC, or SSVC decision data was supplied; KEV=NO and POC=NO, so this is 'no public exploit identified at time of analysis.' There is one signal conflict to flag: the input Tags include 'Information Disclosure,' but the CVSS vector sets C:N and the description describes integrity/availability effects (redirecting SQLite database creation/locking and splitting mutual exclusion), not data disclosure - verify tag against actual impact; it appears mislabeled. The local-only attack vector and the requirement of a shared writable lock directory meaningfully limit real-world exploitability despite the HIGH integrity sub-score.

Exploit ScenarioDerived

On a multi-user host where applications share a common lock directory, a local low-privileged user pre-creates a symlink at the expected lock-database name pointing to another file. When a victim process using filelock's ReadWriteLock/AsyncReadWriteLock (3.20.4-4.0.8) initializes, the resolved path is passed to SQLite, which follows the link and creates/locks the attacker-chosen target, redirecting locking and letting two processes believe they hold exclusive access. No public exploit code was identified at time of analysis.

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

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

Alert me

AnalysisAIv1 – Oct 20, 2026

Symlink redirection in filelock's ReadWriteLock and AsyncReadWriteLock (versions 3.20.4 through 4.0.8) allows a local user with write access to a shared lock directory to plant a symbolic link at the lock database path, causing SQLite to create, open, or lock a different file than the one the victim intended. The practical effect is integrity loss - mutual exclusion can be split between two targets so two processes believe they hold the same lock, and a lock database can be forced into an attacker-chosen location - with a modest availability impact from the resulting SQLite errors. The attacker must already hold a local account (PR:L, AV:L, unauthenticated network access is not a factor), must be able to create names in the lock directory before the victim initialises its lock, and the victim must actually use the newer ReadWriteLock classes rather than the classic FileLock. There is no confirmed active exploitation (not in CISA KEV) and no public exploit code identified at time of analysis, and the issue is fixed in filelock 4.0.9.

RemediationAI

Upgrade to filelock 4.0.9 or later - the upstream fix commit 4d45e83caf7e31f9a12fb44526bdc07f70114f04 adds O_NOFOLLOW plus a regular-file check and descriptor-based SQLite connection, and the release is published at https://github.com/tox-dev/filelock/releases/tag/4.0.9; review the advisory at https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56 and pin/depend on >=4.0.9 in your dependency manifest. Where an immediate upgrade is not possible, the effective compensating control is to remove the attacker's prerequisite rather than to patch the code: ensure the directory holding the ReadWriteLock database is owned by the victim user with mode 0700 (or otherwise not writable by any other principal, including on shared NFS/CI mounts), which eliminates the ability to plant a symlink at all - the trade-off is that lock paths must then be per-user rather than genuinely shared, so cross-user coordination via one lock database is lost. If cross-user locking is genuinely required, avoid ReadWriteLock/AsyncReadWriteLock on 3.20.4-4.0.8 and fall back to the classic FileLock class, which is not implicated by this advisory, or broker the lock through a service that owns the path - both options reduce the rich reader/writer semantics or add an operational dependency. Pre-creating the database file as the victim with restrictive permissions before untrusted users can act narrows the window but is not a reliable substitute for the patch, since the vulnerable code still resolves and reopens the path.

Affected VersionsENISA

filelock 3.20.4, < 4.0.9

Affected Packages

euvd filelock fix: 4.0.9

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 cross-platform advisory/inter-process lock library used across the Python packaging and tooling ecosystem. The ReadWriteLock and AsyncReadWriteLock classes added in 3.20.4 implement reader/writer semantics by storing lock state in a SQLite database file at a caller-supplied path. The root cause is CWE-59 (Improper Link Resolution Before File Access, i.e. link following): the library canonicalised the lock path with Path.resolve(), which follows a final symlink, and then handed that resolved path to sqlite3.connect(). SQLite therefore opened, created, or locked whatever the symlink pointed at, and because resolution happened before the connection, a link planted in a directory where another local user can create entries redirected the lock to an arbitrary file. A second consequence is key aliasing: a symlink path and its target resolve to the same canonical key, so distinct locks can collapse onto one database or, conversely, mutual exclusion can be split between the link and its target. The upstream fix (commit 4d45e83caf7e31f9a12fb44526bdc07f70114f04, released in 4.0.9) stops resolving the final component - only the parent is canonicalised - and opens the database itself with O_RDWR|O_CREAT|O_NOFOLLOW|O_NONBLOCK at mode 0600, rejecting non-regular files (blocking FIFO and device tricks) and then passing the already-validated descriptor to SQLite via /proc/self/fd (Linux) or /dev/fd (macOS/BSD) with journal_mode=MEMORY so no journal name is derived from the synthetic path. On Windows the fix uses a handle opened without delete sharing and rejecting reparse points. The CVSS:3.1 vector AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L reflects a local, low-complexity, low-privilege attack with high integrity and low availability impact and no confidentiality impact.

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:H/A:L
vuln.today AI 6.1 MEDIUM

Attacker needs a local low-privileged account able to create names in a shared lock dir (AV:L, PR:L); symlink planting is reliable (AC:L); impact is lock redirection (I:H, A:L) with no data disclosure (C:N).

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/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
High
Availability
Low

Lifecycle Timeline

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

DescriptionCVE.org

filelock is a platform-independent file lock for Python. From 3.20.4 until 4.0.9, ReadWriteLock and AsyncReadWriteLock versions from 3.20.4 resolve the lock path and pass it to SQLite without rejecting a final symbolic link, allowing another local user who can create names in the lock directory to redirect database creation and locking or split mutual exclusion between targets. This issue is fixed in version 4.0.9.

Threat Intelligence Overview

EPSS Score
0.2%
Top 88% exploitable
Prevalence
High
extremely popular Python dependency, but vulnerable ReadWriteLock feature is new (3.20.4+)
Data Quality
6 sources
Confidence: High

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.2%
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
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

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-112934 MEDIUM
6.1 Oct 20

SoftReadWriteLock in the Python filelock package (4.0.0 through 4.2.0) refreshes holder records by pathname without veri

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