CVE-2026-22701
January 10, 2026
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.
Affected Packages
filelock (CONDA):
Affected version(s) >=2.0.6 <3.20.3Fix Suggestion:
Update to version 3.20.3https://github.com/tox-dev/filelock.git (GITHUB):
Affected version(s) >=3.1.0 <3.20.3Fix Suggestion:
Update to version 3.20.3filelock (PYTHON):
Affected version(s) >=0.2.0 <3.20.3Fix Suggestion:
Update to version 3.20.3filelock (PYTHON):
Affected version(s) >=0.2.0 <3.20.3Fix Suggestion:
Update to version 3.20.3Related Resources (5)
Do you need more information?
Contact UsCVSS v4
Base Score:
5.8
Attack Vector
LOCAL
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
LOW
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
5.3
Attack Vector
LOCAL
Attack Complexity
HIGH
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
HIGH
Weakness Type (CWE)
EPSS
Base Score:
0.02