CVE-2026-22701

NameCVE-2026-22701
Descriptionfilelock 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1125190

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python-filelock (PTS)bullseye3.0.12-2vulnerable
bookworm3.9.0-1vulnerable
trixie3.18.0-1vulnerable
forky3.20.0-1vulnerable
sid3.20.2-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python-filelocksource(unstable)(unfixed)1125190

Notes

https://github.com/tox-dev/filelock/security/advisories/GHSA-qmgc-5h2g-mvrw
Fixed by: https://github.com/tox-dev/filelock/commit/41b42dd2c72aecf7da83dbda5903b8087dddc4d5 (3.20.3)

Search for package or bug name: Reporting problems