Description
filelock is a platform-independent file lock for Python. From 3.20.4 until 4.2.1, ReadWriteLock let SQLite reopen the database and side files by name; on POSIX systems an attacker with rename access in a non-sticky parent can swap those names to cause overwrite or unlink operations, while a writable adjacent hot journal is additionally required for attacker-chosen content overwrites. This issue is fixed in version 4.2.1.
Published: 2026-10-20
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary file overwrite or deletion via lock reinitialization
Action: Immediate Patch
AI Analysis

Impact

ReadWriteLock in the filelock Python library opens the SQLite lock database and its side files using file names. On POSIX systems, an attacker who can rename files inside a non‑sticky parent directory can swap the database and transaction names, causing the lock user to overwrite or unlink its own files. If a writable adjacent hot journal file is also present, the attacker can further create overwrites with attacker‑chosen content. This flaw allows an attacker to delete or corrupt files used by the locked process, potentially leading to loss of data or accidental code replacement.

Affected Systems

All versions of tox‑dev:filelock from 3.20.4 up to, but not including, 4.2.1 are vulnerable. The issue is resolved in release 4.2.1 and later. Users of the filelock package, particularly those running on POSIX platforms, should verify the installed version and upgrade if it falls within the affected range.

Risk and Exploitability

The CVSS score of 7.1 indicates high severity. The EPSS score of 0.00116 indicates a very low exploitation probability, and the vulnerability is not listed in the CISA KEV catalog, but a local attacker with rename and file creation rights in a non‑sticky directory can exploit the flaw by manipulating SQLite lock files. No remote‑execution vector is disclosed; the attack requires local filesystem access and a writable hot journal to achieve arbitrary overwrites. When combined with access to the target process’s environment, the flaw can lead to integrity violations or denial of service.

Generated by OpenCVE AI on October 22, 2026 at 20:42 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to filelock version 4.2.1 or newer.
  • Restrict directory permissions to prevent untrusted users from renaming lock files and creating hot journals in the same parent directory.
  • Run processes that use filelock in isolated environments (e.g., virtualenv, containers) to limit filesystem exposure.

Generated by OpenCVE AI on October 22, 2026 at 20:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-v4x8-3wr5-3wq8 filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal file makes the lock user's process overwrite or unlink its own files
History

Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 21 Oct 2026 18:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-59
CPEs cpe:2.3:a:tox-dev:filelock:*:*:*:*:*:python:*:*

Wed, 21 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-367
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 20 Oct 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Tox-dev
Tox-dev filelock
Vendors & Products Tox-dev
Tox-dev filelock

Tue, 20 Oct 2026 15:00:00 +0000

Type Values Removed Values Added
Description filelock is a platform-independent file lock for Python. From 3.20.4 until 4.2.1, ReadWriteLock let SQLite reopen the database and side files by name; on POSIX systems an attacker with rename access in a non-sticky parent can swap those names to cause overwrite or unlink operations, while a writable adjacent hot journal is additionally required for attacker-chosen content overwrites. This issue is fixed in version 4.2.1.
Title filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal file makes the lock user's process overwrite or unlink its own files
Weaknesses CWE-363
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}


Subscriptions

Tox-dev Filelock
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-22T21:29:27.209Z

Reserved: 2026-10-19T21:30:47.245Z

Link: CVE-2026-112940

cve-icon Vulnrichment

Updated: 2026-10-22T21:29:22.807Z

cve-icon NVD

Status : Modified

Published: 2026-10-20T15:17:16.827

Modified: 2026-10-22T22:18:02.827

Link: CVE-2026-112940

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-20T14:41:49Z

Links: CVE-2026-112940 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T20:45:05Z

Weaknesses
  • CWE-363

    Race Condition Enabling Link Following

  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')