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

Medium 5.3 Published Updated

Local attackers can exploit a race condition in SoftFileLock to cause denial of service or unexpected behavior via symlink manipulation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-22701?

CVE-2026-22701 is a medium-severity vulnerability in tox-dev filelock, published on 10 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.

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.

Weakness: CWE-59, CWE-367, CWE-362

Which versions are affected by CVE-2026-22701?

3 open source packages ship an affected version, including filelock. It affects 1 product.

PackageAffectedFixed in
filelock PyPIAll versions3.20.3
filelock PyPIAll versions3.20.3
filelock PyPIAll versions3.20.3
Linux distribution packages (3)
python-filelock SUSE:Linux Enterprise Module for Development Tools 15 SP7All versions3.0.12-150100.3.9.1
python-filelock SUSE:Linux Enterprise Module for Package Hub 15 SP7All versions3.0.12-150100.3.9.1
python-filelock openSUSE:TumbleweedAll versions3.20.3-1.1

Products include Tox-Dev Filelock.

How do I fix CVE-2026-22701?

Upgrade filelock to 3.20.3 or later.

Is CVE-2026-22701 being exploited?

There is no known exploitation of CVE-2026-22701 in the wild and no public exploit code.

Sources

Also known as AZL-74234, AZL-79235, CLEANSTART-2026-BI98027, DEBIAN-CVE-2026-22701, ECHO-f048-f8f8-c11c, GHSA-qmgc-5h2g-mvrw and 15 more.

Is CVE-2026-22701 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free