Medium severity · published Jan 10, 2026
CVE-2026-22701
filelock Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock
5.3
CVSS
0.1%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
Attack vector
Local
Complexity
High
Privileges
Low
User interaction
None
Confidentiality
None
Integrity
Low
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.1% · higher than 2% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
FI
filelock · tox-dev
< 3.20.3 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-22701
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-22701
Patch
https://github.com/tox-dev/filelock/commit/255ed068bc85d1ef406e50a135e1459170dd1bf0
Patch
https://github.com/tox-dev/filelock/commit/41b42dd2c72aecf7da83dbda5903b8087dddc4d5
Mitigation
https://github.com/tox-dev/filelock/security/advisories/GHSA-qmgc-5h2g-mvrw
More from filelock
7.1
CVE-2026-112940
filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal file makes the lock user's process overwrite or unlink its own files
6.5
CVE-2025-68146
filelock has TOCTOU race condition that allows symlink attacks during lock file creation
6.3
CVE-2026-112911
filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion
6.1
CVE-2026-112937
filelock: ReadWriteLock on the hard-link route deletes any directory another user renames onto its .filelock-* link directory name
6.1
CVE-2026-112936
filelock: ReadWriteLock follows a symlink at the lock path into SQLite
