Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local account on host
-
DeliveryReplace ReadWriteLock SQLite database with crafted file
-
ExploitVictim opens DB during lock acquire
-
ExecutionUnbounded schema/query load runs
-
ImpactLock acquisition stalls or hangs (DoS)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the application to use filelock's ReadWriteLock backed by its SQLite lock database, and a local attacker with a separate account who can replace that database file at the lock's database path - realistic when the database sits in a directory writable by other accounts (the patch's whole purpose is to open SQLite by name only in directories no other account can write, or via a private hard link). The attacker plants a crafted SQLite database whose schema exceeds a few kilobytes to load. Exploitation is limited to local attackers (AV:L) holding a valid account (PR:L); it is not remotely reachable, needs no victim interaction (UI:N), and yields only denial of service (A:H). Versions 3.20.4-4.2.0 are exposed on the initial per-instance open; from 3.30.0 the exposure recurs on every acquisition, making the stall more reliably triggerable. |
| Impact | This is a moderate, locally-scoped availability issue (CWE-400 resource exhaustion), not an urgent priority. The CVSS 3.1 vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (5.5, Medium) is internally consistent with the description: exploitation requires a local user (PR:L, AV:L) who can replace the lock database, and the only impact is availability (A:H) - no confidentiality or integrity loss. No EPSS score, KEV listing, or POC was provided, so exploitation status is: no public exploit identified at time of analysis. The signals do not conflict - all point to a low-to-moderate, local DoS rather than a widely-exploitable flaw. The practical blast radius is a hung or stalled lock acquisition in the victim process, which is a nuisance/denial-of-service rather than a route to code execution or data exposure. Note the attack precondition (an attacker who can already replace another account's lock database) implies the attacker often already has significant filesystem position, which further tempers real-world severity. |
| Exploit ScenarioDerived | A local attacker with write access to the directory holding a ReadWriteLock's SQLite database replaces it with a crafted database whose schema is expensive to load. When the victim application next acquires the lock, SQLite parses the oversized schema without any bound tied to the acquire timeout, causing the acquisition to stall or hang and denying the victim the lock. No public exploit code was identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 20, 2026
Local denial of service in the Python filelock package (versions 3.20.4 through 4.2.0) allows a second local account to stall or hang lock acquisition through ReadWriteLock by planting a crafted SQLite lock database at the database path; the library loads the database schema without bounding the schema or query work, so an oversized schema burns past the acquire timeout. Only local attackers holding a valid account are relevant (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, 5.5), and the outcome is availability loss only - no confidentiality or integrity impact - though the practical triggerability depends on the lock database living in a directory other accounts can write, which is precisely the condition the fix addresses. Exposure occurs on the initial per-instance database open for 3.20.4 and later, and repeats on every acquisition from 3.30.0 onward, so the hang is more reliably reproducible on newer releases. No public exploit code has been identified at time of analysis and there is no CISA KEV listing; a vendor-released patch is available in 4.2.1.
RemediationAI
Upgrade to filelock 4.2.1 or later, the vendor-released patch referenced in GHSA-cwqr-hh33-gh44 and available at https://github.com/tox-dev/filelock/releases/tag/4.2.1 (fix delivered in https://github.com/tox-dev/filelock/pull/834, commit 5e3f2ec0c5fb17cb2635b60b2b68bc63ab81ca2d). If upgrading is not immediately possible, the effective compensating control is to place the lock database in a directory no other account can write - on POSIX a directory owned by the locking account or root and not group- or world-writable (with the sticky bit on any parent directory), and on Windows a directory under %LOCALAPPDATA% whose ACL limits add/remove-name rights to the locking account, SYSTEM and Administrators; the trade-off is that this only removes the attacker's ability to plant the database, it does not bound schema parsing inside the library, so any path where another user can still substitute the file remains exploitable. A second option is to keep the database on a filesystem that supports hard links so that the 4.2.1 private-link path functions, since filesystems without hard link support raise OSError after the fix; conversely, on pre-4.2.1 code there is no such guard, so directory permissions are the only lever. Note that the hardened code also raises ValueError for WAL-mode databases and for schemas larger than a few kilobytes, so applications with unusually large lock-database schemas may need to re-validate their setup after upgrading. Monitor the advisory and changelog for follow-up hardening around journal/WAL handling on Windows (the 854 changelog entry).
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 its ReadWriteLock implements reader/writer semantics on top of a SQLite database used as the lock backend. Because SQLite opens a database by name and manages sidecar files beside it - <database>-journal, <database>-wal and <database>-shm - anything that can create or replace names in the database's directory can influence what SQLite does. The CWE-400 (uncontrolled resource consumption) root cause here is that the lock opens an attacker-controllable SQLite database without bounding schema and query work, so parsing a large or adversarial schema consumes time and memory beyond the acquire timeout instead of failing fast. The upstream fix hardens the trust boundary rather than the parse path alone: SQLite is opened by name only when no process of another account can create names in the directory (the directory belongs to the locking account or root and is not group- or world-writable), otherwise filelock opens SQLite through a private hard link inside a .filelock-* directory readable only by the locking account; on Windows the same decision is derived from the directory's access control list, requiring the owner and every ACE permitting file/subdirectory creation or deletion to name the locking account, SYSTEM or Administrators. Filesystems without hard link support now raise OSError, a WAL-mode database still raises ValueError, and a database whose schema takes more than a few kilobytes to load raises ValueError instead of running past the acquire timeout. The fix also stops the lock from acting on -journal, -wal or -shm files another process places beside the database, closing related write-into-another-file and reader-beside-writer edge cases (see changelog entries for PRs 834 and 854).
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:N/A:H
Local attacker with a separate account replaces the lock database (AV:L, PR:L); reliably triggered especially from 3.30.0 (AC:L); only availability affected via stalled acquisition (A:H), no C/I impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
filelock is a platform-independent file lock for Python. From 3.20.4 until 4.2.1, ReadWriteLock can open a crafted SQLite lock database without bounding schema and query work, allowing another local user who can replace the database to make acquisition stall or hang; versions from 3.20.4 expose this on initial per-instance opening, and versions from 3.30.0 repeat the exposure on every acquisition. 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
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
SoftReadWriteLock in the Python filelock package (4.0.0 through 4.2.0) refreshes holder records by pathname without veri
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
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-105021
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB