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.
OpenCVE Enrichment
Github GHSA