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: n/a
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. EPSS is not available, 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 20, 2026 at 17:28 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 20, 2026 at 17:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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-20T14:41:49.555Z

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

Link: CVE-2026-112940

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-112940

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T17:30:13Z

Weaknesses
  • CWE-363

    Race Condition Enabling Link Following