{"id":"CVE-2026-22701","title":"filelock: filelock Time-of-Check-Time-of-Use (TOCTOU) in SoftFileLock (CVE-2026-22701)","summary":"A Time-of-Check-Time-of-Use (TOCTOU) flaw has been discovered in the pypi filelock package. The TOCTOU race condition vulnerability exists in the SoftFileLock implementation of the filelock package. An attacker with local filesystem access…","severity":"medium","cvss":5.3,"cvssVector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","cvssSource":"vendor","cwe":"CWE-367","vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","affected":["migration_toolkit_for_containers","openshift_lightspeed","openshift_service_mesh 2","ai_inference_server","ansible_automation_platform 2","ansible_automation_platform_ansible_core 2","enterprise_linux_ai_rhel_ai 3","openshift_ai_rhoai","openshift_container_platform 4","openshift_dev_spaces","openstack_platform 18.0","satellite 6","trusted_artifact_signer"],"patched":["filelock 3.20.3"],"published":"2026-01-10","updated":"2026-09-23","sourceUpdated":"2026-09-23T04:22:47+00:00","source":"CSAF","sourceUrl":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-22701.json","references":[{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-22701.json"},{"url":"https://access.redhat.com/security/cve/CVE-2026-22701"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2428442"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-22701"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22701"},{"url":"https://github.com/tox-dev/filelock/commit/255ed068bc85d1ef406e50a135e1459170dd1bf0"},{"url":"https://github.com/tox-dev/filelock/commit/41b42dd2c72aecf7da83dbda5903b8087dddc4d5"},{"url":"https://github.com/tox-dev/filelock/security/advisories/GHSA-qmgc-5h2g-mvrw"},{"url":"https://github.com/tox-dev/filelock"}],"tags":["csaf","vex","red-hat","osv","pip"],"epss":0.00128,"epssPercentile":0.02843,"aliases":["GHSA-qmgc-5h2g-mvrw","PYSEC-2026-1374"],"ecosystem":"pip","ingestedAt":"2026-07-08T18:25:52.456Z","slug":"CVE-2026-22701","body":"## Overview\n\nA Time-of-Check-Time-of-Use (TOCTOU) flaw has been discovered in the pypi filelock package. The 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.\n\n## Vendor advisories\n\n- **Red Hat VEX** · Moderate · affected: Migration Toolkit for Containers, OpenShift Lightspeed, OpenShift Service Mesh 2, Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, Red Hat Ansible Automation Platform Ansible Core 2, … · no fix planned: Migration Toolkit for Containers, OpenShift Lightspeed, OpenShift Service Mesh 2, Red Hat AI Inference Server, … · updated 2026-09-23 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-22701.json)\n\n**filelock: filelock Time-of-Check-Time-of-Use (TOCTOU) in SoftFileLock** — rated Moderate by Red Hat. Released 2026-01-10, updated 2026-09-23.\n\nAffected:\n\n- Migration Toolkit for Containers\n- OpenShift Lightspeed\n- OpenShift Service Mesh 2\n- Red Hat AI Inference Server\n- Red Hat Ansible Automation Platform 2\n- Red Hat Ansible Automation Platform Ansible Core 2\n- Red Hat Enterprise Linux AI (RHEL AI) 3\n- Red Hat OpenShift AI (RHOAI)\n- Red Hat OpenShift Container Platform 4\n- Red Hat OpenShift Dev Spaces\n- Red Hat OpenStack Platform 18.0\n- Red Hat Satellite 6\n- Red Hat Trusted Artifact Signer\n\nNo fix planned:\n\n- Migration Toolkit for Containers\n- OpenShift Lightspeed\n- OpenShift Service Mesh 2\n- Red Hat AI Inference Server\n- Red Hat Ansible Automation Platform 2\n- Red Hat Ansible Automation Platform Ansible Core 2\n- Red Hat Enterprise Linux AI (RHEL AI) 3\n- Red Hat OpenShift AI (RHOAI)\n- Red Hat OpenShift Container Platform 4\n- Red Hat OpenShift Dev Spaces\n- Red Hat OpenStack Platform 18.0\n- Red Hat Satellite 6\n- Red Hat Trusted Artifact Signer\n\n## Remediation\n\nFix deferred\n\nWorkarounds / mitigations:\n\n- Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.\n\n## Package advisory (CVE-2026-22701)\n\nAffected packages:\n\n- `filelock < 3.20.3`\n\nPatched in:\n\n- `filelock 3.20.3`\n\nSource: https://osv.dev/vulnerability/GHSA-qmgc-5h2g-mvrw","depth":"sunlit","depthScore":29,"depthScoreParts":{"impact":29.2,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}