{"answers":{"affected":"3 open source packages ship an affected version, including filelock. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-22701 in the wild and no public exploit code.","fix":"Upgrade filelock to 3.20.3 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2026-22701 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2026-22701 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- filelock (PyPI): affected all versions; fixed in 3.20.3\n- filelock (PyPI): affected all versions; fixed in 3.20.3\n- filelock (PyPI): affected all versions; fixed in 3.20.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-22701/ (Markdown: https://insights.sbomify.com/CVE-2026-22701/index.md)","id":"CVE-2026-22701","markdown":"https://insights.sbomify.com/CVE-2026-22701/index.md","name":"CVE-2026-22701","record":{"aliases":["AZL-74234","AZL-79235","CLEANSTART-2026-BI98027","DEBIAN-CVE-2026-22701","ECHO-f048-f8f8-c11c","GHSA-qmgc-5h2g-mvrw","MINI-73gr-hxjp-p953","MINI-g5jw-ph6w-q47q","MINI-gq28-gf73-vqrg","MINI-qf4j-9xjw-6574","MINI-rgqr-cqgm-77qc","MINI-v7m5-vjpp-cf32","OESA-2026-1237","OESA-2026-1238","OESA-2026-1239","OESA-2026-1240","PYSEC-2026-1374","ROOT-APP-PYPI-CVE-2026-22701","SUSE-SU-2026:0335-1","UBUNTU-CVE-2026-22701","openSUSE-SU-2026:10043-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service","other"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python file lock library","requires_auth":"low_privilege","summary":"Local attackers can exploit a race condition in SoftFileLock to cause denial of service or unexpected behavior via symlink manipulation.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"filelock","vendor":"tox-dev"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"},{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"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.","ecosystems":["PyPI","SUSE:Linux Enterprise Module for Development Tools 15 SP7","SUSE:Linux Enterprise Module for Package Hub 15 SP7","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"filelock Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock","id":"CVE-2026-22701","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"race_condition","year":"2026"},"n_packages":6,"n_references":3,"next":{"headline":"virtualenv Has TOCTOU Vulnerabilities in Directory Creation","id":"CVE-2026-22702"},"packages":[{"ecosystem":"PyPI","fixed":["3.20.3"],"introduced":["0"],"last_affected":[],"package":"filelock","purl":null,"source":"GHSA-qmgc-5h2g-mvrw"},{"ecosystem":"PyPI","fixed":["3.20.3"],"introduced":["0"],"last_affected":[],"package":"filelock","purl":"pkg:pypi/filelock","source":"GHSA-qmgc-5h2g-mvrw"},{"ecosystem":"PyPI","fixed":["3.20.3"],"introduced":["0"],"last_affected":[],"package":"filelock","purl":"pkg:pypi/filelock","source":"PYSEC-2026-1374"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP7","fixed":["3.0.12-150100.3.9.1"],"introduced":["0"],"last_affected":[],"package":"python-filelock","purl":"pkg:rpm/suse/python-filelock\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP7","source":"SUSE-SU-2026:0335-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP7","fixed":["3.0.12-150100.3.9.1"],"introduced":["0"],"last_affected":[],"package":"python-filelock","purl":"pkg:rpm/suse/python-filelock\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP7","source":"SUSE-SU-2026:0335-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.20.3-1.1"],"introduced":["0"],"last_affected":[],"package":"python-filelock","purl":"pkg:rpm/opensuse/python-filelock\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:10043-1"}],"prev":{"headline":"RustCrypto Has Insufficient Length Validation in decrypt() in SM2-PKE","id":"CVE-2026-22700"},"products":["filelock"],"published":"2026-01-10","related":[{"cvss_score":7.1,"headline":"filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal file makes the lock user's process overwrite or unlink its own files","id":"CVE-2026-112940","kev_date_added":null,"published":"2026-10-20"},{"cvss_score":6.3,"headline":"filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion","id":"CVE-2026-112911","kev_date_added":null,"published":"2026-10-20"},{"cvss_score":6.3,"headline":"filelock has TOCTOU race condition that allows symlink attacks during lock file creation","id":"CVE-2025-68146","kev_date_added":null,"published":"2025-12-16"},{"cvss_score":6.1,"headline":"filelock: UnixFileLock truncates and chmods any regular file another user renames or hard-links onto the lock path","id":"CVE-2026-112909","kev_date_added":null,"published":"2026-10-20"},{"cvss_score":6.1,"headline":"filelock: SoftReadWriteLock holder refresh writes through a hard link and hangs on a named pipe that another local user renames over its record","id":"CVE-2026-112934","kev_date_added":null,"published":"2026-10-20"},{"cvss_score":6.1,"headline":"filelock: ReadWriteLock follows a symlink at the lock path into SQLite","id":"CVE-2026-112936","kev_date_added":null,"published":"2026-10-20"},{"cvss_score":6.1,"headline":"filelock: ReadWriteLock on the hard-link route deletes any directory another user renames onto its .filelock-* link directory name","id":"CVE-2026-112937","kev_date_added":null,"published":"2026-10-20"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-01-12","vendors":["tox-dev"]},"summary":"Local attackers can exploit a race condition in SoftFileLock to cause denial of service or unexpected behavior via symlink manipulation.","url":"https://insights.sbomify.com/CVE-2026-22701/"}