Description
filelock is a platform-independent file lock for Python. From 4.1.0 until 4.2.1, ReadWriteLock can remove a randomized .filelock-* private-hard-link directory during cleanup, allowing another local user with rename access in a non-sticky parent to observe a live name or forge a dead-owner sweep name and rename a sibling directory onto it for deletion. This issue is fixed in version 4.2.1.
Published: 2026-10-20
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Deletion of directories by local user
Action: Patch
AI Analysis

Impact

filelock is a platform‑independent file lock library for Python. Between versions 4.1.0 and 4.2.1, its ReadWriteLock implementation may remove a random .filelock‑* private‑hard‑link directory during cleanup. A local user who has permission to rename files in a non‑sticky parent directory can trigger this removal by forging a dead‑owner sweep name and renaming a sibling directory onto the .filelock‑* name. This leads to the deletion of the sibling directory, effectively deleting another user’s data and representing a directory‑deletion vulnerability (CWE‑367).

Affected Systems

The vulnerable product is tox‑dev:filelock, specifically versions 4.1.0 through 4.2.1. Any installation that has not been updated to 4.2.1 or later is susceptible. The issue was fixed in the 4.2.1 release. Systems running earlier releases should consider this vulnerability relevant if they allow shared write access to non‑sticky directories.

Risk and Exploitability

The CVSS score is 6.1, indicating moderate severity. EPSS data is not available, and the vulnerability is not listed in CISA KEV, suggesting no known widespread exploitation yet. The attack requires local file‑system access and the ability to rename files in a directory that is not sticky, which are common in multi‑user environments. Because the vector is local and limited to rename permissions, the likelihood of widespread exploitation is uncertain, but the impact on data integrity is significant if conditions are met.

Generated by OpenCVE AI on October 20, 2026 at 18:03 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the tox‑dev:filelock package to version 4.2.1 or later.
  • Restrict rename privileges on parent directories that contain .filelock‑* folders so that only the directory owner can rename files.
  • If upgrading immediately is not possible, configure the parent directory as sticky or apply ACLs to prevent other users from renaming .filelock‑* directories.
  • Audit installed packages for versions 4.1.0 through 4.2.1 and plan a phased upgrade to the fixed release.

Generated by OpenCVE AI on October 20, 2026 at 18:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-jqc4-5cvw-7w85 filelock: ReadWriteLock on the hard-link route deletes any directory another user renames onto its .filelock-* link directory name
History

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

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

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

Type Values Removed Values Added
Metrics ssvc

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


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 4.1.0 until 4.2.1, ReadWriteLock can remove a randomized .filelock-* private-hard-link directory during cleanup, allowing another local user with rename access in a non-sticky parent to observe a live name or forge a dead-owner sweep name and rename a sibling directory onto it for deletion. This issue is fixed in version 4.2.1.
Title filelock: ReadWriteLock on the hard-link route deletes any directory another user renames onto its .filelock-* link directory name
Weaknesses CWE-367
References
Metrics cvssV3_1

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


Subscriptions

Tox-dev Filelock
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-21T15:55:14.113Z

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

Link: CVE-2026-112937

cve-icon Vulnrichment

Updated: 2026-10-21T14:24:21.152Z

cve-icon NVD

Status : Analyzed

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

Modified: 2026-10-21T18:05:42.917

Link: CVE-2026-112937

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T18:15:14Z

Weaknesses
  • CWE-367

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