CVE-2026-22701 Details
Description
filelock is a platform-independent file lock for Python. Prior to version 3.20.3, a TOCTOU race condition vulnerability exists in the SoftFileLock implementation of the filelock package. An attacker with local filesystem access and permission to create symlinks can exploit a race condition between the permission validation and file creation to cause lock operations to fail or behave unexpectedly. The vulnerability occurs in the _acquire() method between raise_on_not_writable_file() (permission check) and os.open() (file creation). During this race window, an attacker can create a symlink at the lock file path, potentially causing the lock to operate on an unintended target file or leading to denial of service. This issue has been patched in version 3.20.3.
A Time-of-Check-Time-of-Use (TOCTOU) race condition vulnerability has been identified in the SoftFileLock implementation of the filelock package, prior to version 3.20.3. This vulnerability allows an attacker with local filesystem access and permission to create symlinks to exploit a race condition between permission validation and file creation. The issue arises in the _acquire() method, where an attacker can create a symlink at the lock file path during the brief interval between the permission check and the actual file creation. This exploitation can cause lock operations to fail or behave unpredictably, potentially leading to a denial-of-service condition or causing locks to interfere with unintended files.
Users should upgrade to filelock version 3.20.3 or later, where this vulnerability has been patched. For critical deployments, consider using UnixFileLock or WindowsFileLock instead of SoftFileLock, as these provide stronger guarantees through OS-level file locking and have already been patched for similar vulnerabilities.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 12, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-362 | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | [email protected] |
| CWE-367 | Time-of-check Time-of-use (TOCTOU) Race Condition | [email protected] |
| CWE-59 | Improper Link Resolution Before File Access ('Link Following') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| tox-dev filelock | < 3.20.3 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 5, 2026 | Initial Analysis | [email protected] |
| Jan 10, 2026 | New CVE Received | [email protected] |