Skip to content
Fencer Vulns
medium 5.3

CVE-2026-22701 json

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

published 2026-01-10 9 mo ago modified 2026-09-10 1 mo ago also GHSA-qmgc-5h2g-mvrw , PYSEC-2026-1374 , EUVD-2026-1870

cvss
5.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.1%
EPSS 0.1% chance of exploitation in 30 days, percentile 2%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi filelock 3.20.3
  • tox-dev filelock 3.20.3
  • python-filelock Debian 12 3.9.0-1+deb12u1
  • python-filelock Debian 14 3.20.3-1

debian advisories DEBIAN-CVE-2026-22701

  • python-filelock Ubuntu Pro 18.04 LTS 3.0.4-1ubuntu0.1~esm1
  • python-filelock Ubuntu Pro 22.04 LTS 3.6.0-1ubuntu0.1~esm1
  • python-filelock Ubuntu Pro 24.04 LTS 3.13.1-1ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2026-22701

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-filelock SLES for SAP applications 16.0, SLES 16.0 3.18.0-160000.3.1
  • python-filelock SLE Module for Package Hub 15 SP7, SLE Module for Development Tools 15 SP7 3.0.12-150100.3.9.1
  • python-filelock SLE Module for Python 3 15 SP7, openSUSE Leap 15.6 3.12.2-150400.10.8.1

suse advisories SUSE-SU-2026:20216-1SUSE-SU-2026:0335-1SUSE-SU-2026:0220-1

  • python-filelock openSUSE Leap 16.0 3.18.0-160000.3.1
  • python-filelock openSUSE Tumbleweed 3.20.3-1.1

opensuse advisories openSUSE-SU-2026:20144-1openSUSE-SU-2026:10043-1

  • python-filelock Azure Linux 3.0 3.20.3-1

azure linux advisories AZL-74234

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-22701 updated cvss 5.3

filelock: filelock Time-of-Check-Time-of-Use (TOCTOU) in SoftFileLock

  • Red Hat Migration Toolkit for Containers rhmtc/openshift-migration-hook-runner-rhel8 Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-ocp-rag-rhel9, openshift-lightspeed/lightspeed-service-api-rhel9, openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9 Red Hat OpenShift Service Mesh 2 openshift-service-mesh/pilot-rhel8, openshift-service-mesh/grafana-rhel8, openshift-service-mesh/proxyv2-rhel9, openshift-service-mesh/istio-cni-rhel8, openshift-service-mesh/ratelimit-rhel8, openshift-service-mesh/istio-rhel8-operator, +2 more Red Hat AI Inference Server rhaiis/vllm-tpu-rhel9, rhaiis/vllm-cuda-rhel9, rhaiis/vllm-rocm-rhel9, rhaiis/vllm-spyre-rhel9, rhaiis/model-opt-cuda-rhel9, rhaiis-preview/vllm-cuda-rhel9 Red Hat Ansible Automation Platform 2 python-filelock, python3x-filelock, python3.11-filelock, automation-controller, ansible-automation-platform-24/hub-rhel8, ansible-automation-platform-25/hub-rhel8, +42 more Red Hat Ansible Automation Platform Ansible Core 2 ansible-automation-platform/ee-minimal-rhel8, ansible-automation-platform/ee-minimal-rhel9, ansible-automation-platform-tech-preview/ee-minimal-rhel8, ansible-automation-platform-tech-preview/ee-minimal-rhel9
    +7 more products
    Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-cuda-rhel9, rhelai3/bootc-aws-cuda-rhel9, rhelai3/bootc-gcp-cuda-rhel9, rhelai3/disk-image-cuda-rhel9, rhelai3/bootc-azure-cuda-rhel9 Red Hat OpenShift AI (RHOAI) rhoai/odh-vllm-cpu-rhel9, rhoai/odh-vllm-cuda-rhel9, rhoai/odh-vllm-rocm-rhel9, rhoai/odh-caikit-nlp-rhel9, rhoai/odh-vllm-gaudi-rhel9, rhoai/odh-ta-lmes-job-rhel9, +40 more Red Hat OpenShift Container Platform 4 python-filelock Red Hat OpenShift Dev Spaces devspaces/udi-rhel9, devspaces/udi-base-rhel9, devspaces/dashboard-rhel9, devspaces/udi-base-rhel10, devspaces/devspaces-operator-bundle Red Hat OpenStack Platform 18.0 rhoso-operators/ee-openstack-ansible-ee-rhel9 Red Hat Satellite 6 satellite/iop-puptoo-rhel9, satellite/iop-yuptoo-rhel9, satellite/iop-advisor-engine-rhel9, satellite/iop-host-inventory-rhel9, satellite/iop-advisor-backend-rhel9, satellite/iop-insights-engine-rhel9, +1 more Red Hat Trusted Artifact Signer rhtas/model-transparency-rhel9
    affected: workaround, no fix available “Fix deferred”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
9 mo ago

Exploit prediction

0.13% chance of exploitation in the next 30 days, higher than 2% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 5.3 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
GitHub 3.1 5.3 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
OSV 3.1 5.3 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H

Affected packages

ecosystem package affected fixed in
pypi filelock
<3.20.3
3.20.3

Affected products

  • tox-dev filelock

Classification

Weakness
  • CWE-59 Improper Link Resolution Before File Access
  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization
  • CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.