Description
filelock is a platform-independent file lock for Python. From 4.1.0 until 4.2.1, SoftReadWriteLock and AsyncSoftReadWriteLock cache a successful check of the <path>.rw lock tree and resolve its names again during later record operations, allowing another local user who can replace that tree after the first acquisition to redirect lock-record writes into directories writable by the lock user. This issue is fixed in version 4.2.1.
Published: 2026-10-20
Score: 3.3 Low
EPSS: < 1% Very Low
KEV: No
Impact: Local File Write / Privilege Escalation
Action: Apply Patch
AI Analysis

Impact

This vulnerability allows a local user to influence which directories are used to store lock records when a SoftReadWriteLock or AsyncSoftReadWriteLock obtains a lock. After the first acquisition the lock object caches the lock tree; a subsequent local attacker can swap the lock tree before another operation, causing the lock to write records into a directory of the attacker’s choice. Consequently the attacker can write arbitrary files under a path owned by the user holding the lock, effectively providing local file‑write privileges that could lead to privilege escalation or execution of arbitrary code on the system.

Affected Systems

Software affected is the filelock library for Python distributed by tox‑dev. Versions 4.1.0 through 4.2.1 are impacted; the issue is resolved in release 4.2.1.

Risk and Exploitability

The CVSS base score is 3.3, indicating low overall severity. No EPSS score is available and the vulnerability is not listed in the CISA KEV catalog, suggesting limited known exploitation. The attack requires local access to the same machine and the ability to perform operations that replace the lock tree between lock acquisition and subsequent record writes. Because it involves only local authorization and no network exposure, the risk is confined to environments where multiple local users share the same Python process space.

Generated by OpenCVE AI on October 20, 2026 at 17:27 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the filelock dependency to version 4.2.1 or later.
  • If upgrading is not possible, run the application under a dedicated user that has no write permissions to the lock directories that are used by the library.
  • Audit any custom lock path configurations to ensure they cannot reference directories writable by other local users.

Generated by OpenCVE AI on October 20, 2026 at 17:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-wfhq-q4j2-c37m filelock: SoftReadWriteLock follows a lock tree swapped in after its first acquire and writes lock records into directories of the user running the lock
History

Wed, 28 Oct 2026 15:30: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:00:00 +0000

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

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

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Low


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, SoftReadWriteLock and AsyncSoftReadWriteLock cache a successful check of the <path>.rw lock tree and resolve its names again during later record operations, allowing another local user who can replace that tree after the first acquisition to redirect lock-record writes into directories writable by the lock user. This issue is fixed in version 4.2.1.
Title filelock: SoftReadWriteLock follows a lock tree swapped in after its first acquire and writes lock records into directories of the user running the lock
Weaknesses CWE-367
References
Metrics cvssV3_1

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


Subscriptions

Tox-dev Filelock
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-28T14:14:54.297Z

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

Link: CVE-2026-112941

cve-icon Vulnrichment

Updated: 2026-10-28T14:14:29.684Z

cve-icon NVD

Status : Modified

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

Modified: 2026-10-28T15:17:03.070

Link: CVE-2026-112941

cve-icon Redhat

Severity : Low

Publid Date: 2026-10-20T14:43:18Z

Links: CVE-2026-112941 - Bugzilla

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-367

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