Vulnerability · Published Jan 10, 2026 · Assigned by GitHub_M

CVE-2026-22701filelock Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock

Medium 5.3

In plain English

A medium-severity race condition in filelock from tox-dev. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 2% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.1%top 97.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-filelock3.9.0-1+deb12u1DEBIAN-CVE-2026-22701
Debian:13python-filelockno fix listedDEBIAN-CVE-2026-22701
Debian:14python-filelock3.20.3-1DEBIAN-CVE-2026-22701
PyPIfilelock3.20.3GHSA-qmgc-5h2g-mvrw
PyPIfilelock3.20.3PYSEC-2026-1374
Ubuntu:25.10python-filelockno fix listedUBUNTU-CVE-2026-22701
Ubuntu:26.04:LTSpython-filelockno fix listedUBUNTU-CVE-2026-22701
Ubuntu:26.10python-filelockno fix listedUBUNTU-CVE-2026-22701

Affected products (as reported)

VendorProductVersions
tox-dev filelock < 3.20.3

Weakness: CWE-59, CWE-362, CWE-367 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H

References