Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-22701 EUVD-2026-1870GHSA-qmgc-5h2g-mvrwPYSEC-2026-1374

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

Published Jan 10, 2026 · Updated Jan 12, 2026 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
tox-dev filelock < 3.20.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-filelock 3.20.3-1 —
Debian 13 python-filelock No fix yet —
Debian 12 python-filelock 3.9.0-1+deb12u1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 python-filelock No fix yet —
Ubuntu 25.10 python-filelock No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS python-filelock 3.13.1-1ubuntu0.1~esm1 USN-7999-1
Ubuntu Pro 22.04 LTS python-filelock 3.6.0-1ubuntu0.1~esm1 USN-7999-1
Ubuntu Pro 20.04 LTS python-filelock 3.0.12-2ubuntu0.1~esm1 USN-7999-1
Ubuntu Pro 18.04 LTS python-filelock 3.0.4-1ubuntu0.1~esm1 USN-7999-1
ReleasePackageFixed inAdvisory
SLES 15 SP7 python-filelock 3.0.12-150100.3.9.1 SUSE-SU-2026:0335-1
SLES 3 python-filelock 3.12.2-150400.10.8.1 SUSE-SU-2026:0220-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-filelock 3.18.0-160000.3.1 SUSE-SU-2026:20216-1
SLES 16.0 python-filelock 3.18.0-160000.3.1 SUSE-SU-2026:20216-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-filelock 3.20.3-1.1 openSUSE-SU-2026:10043-1
openSUSE Leap 16.0 python-filelock 3.18.0-160000.3.1 openSUSE-SU-2026:20144-1
openSUSE Leap 15.6 python-filelock 3.12.2-150400.10.8.1 SUSE-SU-2026:0220-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-filelock +1 3.3.1-1.amzn2023.0.2 ALAS2023-2026-1415
Amazon Linux 2023 python3.13-filelock 3.18.0-1.amzn2023.0.1 ALAS2023-2026-1411

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-filelock 3.20.3-1 —
Azure Linux 2 (CBL-Mariner) python-filelock No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling airflow-3 3.1.5-r4 —
Wolfi rolling datadog-agent-7.72-core-integrations No fix yet —
Wolfi rolling datadog-agent-7.73-core-integrations 7.73.3-r23 —
Wolfi rolling py3-cassandra-medusa 0.27.0-r1 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI filelock < 3.20.3 3.20.3 GHSA-qmgc-5h2g-mvrw

Advisories 8

References