Skip to main content

filelock CVE-2026-144395

| EUVDEUVD-2026-143615 MEDIUM
Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367)
2026-12-03 security-advisories@github.com
4.4
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Hold local account on shared POSIX host
  2. Delivery
    Swap watched directory above lock database
  3. Exploit
    Win TOCTOU race before first SQL statement
  4. Execution
    Redirect SQLite to victim-writable path
  5. Impact
    Overwrite victim-owned file

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
Exploitation Conditions

Requires a POSIX system (overwrite confirmed on Linux) where the attacker already has a separate local account with rename access inside a shared, non-sticky directory that hosts the victim's SQLite-backed ReadWriteLock or AsyncReadWriteLock; the setup also required a victim-owned directory that the other account could previously read. The attacker must win a TOCTOU race, swapping a directory above the database between filelock's identity check and SQLite's first SQL statement. Limiting factors that reduce realistic risk: this is not exploitable remotely or against a default single-user layout - it needs a pre-existing untrusted local account, a non-default shared/non-sticky parent directory, victim interaction (the victim process must run a lock operation, UI:R), and success in a timing-sensitive race (AC:H). Vendor mitigation per GHSA: upgrade every process sharing the database to 4.3.0 or later; until then keep the parent writable only by the locking account or use a sticky shared parent.

Impact

This is a medium-severity (CVSS 4.4) local, integrity-only flaw, and the combined signals point to a low real-world priority rather than an urgent emergency. The CVSS vector CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N requires local access (AV:L), an already-provisioned separate account with low privileges (PR:L), high attack complexity (AC:H, consistent with the CWE-367 TOCTOU race the attacker must win), and victim interaction (UI:R, the victim process must actually perform a ReadWriteLock operation). Impact is confined to integrity (I:H) - a cross-account file overwrite - with no confidentiality or availability loss (C:N/A:N). There is no EPSS score in the input, this CVE is not listed in CISA KEV, and no public exploit or PoC reference is provided (only commit, PR, release, and GHSA advisory links) - so there is no public exploit identified at time of analysis. The vuln.today decision label is 'this_month', not act_now or emergency, which aligns with the constrained local, high-complexity, interaction-dependent nature of the bug. One data inconsistency to note: the input Tags include 'Information Disclosure', but the CVSS vector sets C:N and the GHSA advisory titles the issue as a file overwrite, so the real impact is integrity, not disclosure - the read prerequisite ('a victim-owned directory that the other account could previously read') is a setup condition, not the outcome. Overall this is a genuine but narrowly-scoped local privilege/integrity issue most relevant to shared multi-user POSIX/Linux hosts, not a broadly exploitable network threat.

Exploit ScenarioDerived

On a shared multi-user POSIX/Linux host, an attacker who already holds a separate local account with rename access to a shared, non-sticky directory used by a victim's SQLite-backed filelock ReadWriteLock swaps a directory above the lock database during the victim's locking operation. By winning the race between filelock's identity check and SQLite's first statement, the attacker redirects the operation to overwrite a file writable by the victim process, as confirmed on Linux by the vendor. No public exploit code is identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

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

Alert me

AnalysisAIv1 – Dec 03, 2026

A time-of-check/time-of-use (TOCTOU) flaw in Python's filelock library before 4.3.0 lets another local account redirect a SQLite-backed ReadWriteLock (or AsyncReadWriteLock) operation so that SQLite acts on a file the attacker controls, resulting in a cross-account file overwrite confirmed on Linux. Exploitation requires a non-default layout: a shared, non-sticky lock parent directory where the attacker holds rename access, plus a victim-owned directory the attacker could previously read, and the attacker must win a race between filelock's identity check and SQLite's first SQL statement while the victim process performs a lock operation. The assessed risk is medium (CVSS 4.4, local, integrity-only, AC:H and UI:R), no public exploit code or CISA KEV entry is associated, and the vendor-released fix is version 4.3.0.

RemediationAI

Vendor-released patch: filelock 4.3.0, per the GitHub advisory GHSA-22wc-j8c9-7gxg and release https://github.com/tox-dev/filelock/releases/tag/4.3.0 (fix in PR #1096, commit d7324f5); upgrade every process that shares the database before resuming operations, since the advisory explicitly warns that mixed old/new runtimes must be converted together and that stopping all users of the database is required before removing any stale .filelock-* directories by hand. Until all consumers are upgraded, the vendor's stated mitigation is to keep the lock directory's parent writable only by the locking account, or to place it under a sticky shared parent, which removes the attacker's rename primitive; the trade-off is that a non-sticky shared directory usable by multiple accounts can no longer be used for the lock database. The advisory does not describe any other compensating control, and no patch status beyond the 4.3.0 release is given; note the trigger is a timing-sensitive local race (AC:H, UI:R) requiring a pre-existing untrusted local account, not a remote or default-configuration exposure.

Affected VersionsENISA

filelock < 4.3.0

Affected Packages

euvd filelock fix: 4.3.0

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 implements cross-process file locking for Python; its ReadWriteLock/AsyncReadWriteLock store lock state in a SQLite database, which on POSIX opens the database by name and also touches side files named <database>-journal, <database>-wal and <database>-shm. To keep those side names out of reach of other accounts, earlier releases opened SQLite through a hard link placed in a .filelock-* directory made private; the root cause per CWE-367 is that the identity of the checked path could still be swapped before SQLite's open, because whoever can rename an entry in a directory above the database owns every name below it. The attacker who controls a shared, non-sticky parent can swap a directory (for example a watched directory) between filelock's identity verification and SQLite's first statement, so SQLite resolves -journal/-wal under the replacement directory: it can delete them, and beside a non-empty database it can first replay the journal into that database and unlink the file the journal names, yielding the confirmed cross-account overwrite. The 4.3.0 fix (PR #1096) creates the final database link inside a freshly created owner-only directory, verifies/sets mode 0700, requires the link to exist when SQLite opens it, and bounds parent-directory enumeration in dead-holder link sweeps; the advisory also notes the affected setup additionally required a victim-owned directory the other account could previously read, and that the trigger depends on a timing-sensitive race rather than a deterministic sequence.

Know when Python 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) PRIMARY 4.4 MEDIUM
AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N
vuln.today AI 4.4 MEDIUM

A separate local account (PR:L) must win a TOCTOU race in a non-default shared directory (AV:L/AC:H) while the victim runs a lock operation (UI:R); the overwrite yields I:H with C/A:N.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

Lifecycle Timeline

2
Patch available
Dec 03, 2026 - 20:35 EUVD
CVE Published
Dec 03, 2026 - 20:17 cve.org
MEDIUM 4.4

DescriptionCVE.org

filelock is a platform-independent file lock for Python. Prior to 4.3.0, on POSIX, another account with rename access in a shared, non-sticky lock directory can redirect a SQLite-backed ReadWriteLock operation to a file writable by the locking process. A cross-account overwrite was confirmed on Linux. The affected setup also required a victim-owned directory that the other account could previously read. This issue is fixed in version 4.3.0.

Threat Intelligence Overview

Prevalence
High
extremely common Python dependency, though vulnerable ReadWriteLock feature is narrowly used
Social Media
1
Sightings
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 N/A
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
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

22
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +22
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

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