Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-22701: CWE-59: Improper Link Resolution Before File Access ('Link Following') in tox-dev filelock

0
Medium
VulnerabilityCVE-2026-22701cvecve-2026-22701cwe-59cwe-362cwe-367
Published: Sat Jan 10 2026 (01/10/2026, 05:59:28 UTC)
Source: CVE Database V5
Vendor/Project: tox-dev
Product: filelock

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.

AI-Powered Analysis

AILast updated: 01/17/2026, 07:55:22 UTC

Technical Analysis

The vulnerability CVE-2026-22701 resides in the Python filelock package, specifically in the SoftFileLock implementation prior to version 3.20.3. The issue is a time-of-check to time-of-use (TOCTOU) race condition occurring in the _acquire() method. During lock acquisition, the function raise_on_not_writable_file() performs a permission check on the lock file path, followed by os.open() to create or open the lock file. Between these two operations, an attacker with local filesystem access and the ability to create symbolic links can introduce a symlink at the lock file path. This symlink can redirect the lock operation to an unintended target file, causing the lock to fail or behave unpredictably. Such behavior can lead to denial of service by preventing proper locking or can compromise the integrity of files by locking or modifying unintended files. The vulnerability requires local access with permissions to create symlinks, which limits remote exploitation but remains critical in shared or multi-tenant environments. The issue is classified under CWE-59 (Improper Link Resolution Before File Access), CWE-362 (Race Condition), and CWE-367 (Time-of-check Time-of-use Race Condition). The vulnerability has a CVSS 3.1 score of 5.3 (medium severity), reflecting its moderate impact and exploitation complexity. No known exploits are reported in the wild, and the issue has been addressed in filelock version 3.20.3.

Potential Impact

For European organizations, the impact of this vulnerability depends largely on the deployment context of the filelock package. Organizations using Python applications that rely on filelock for concurrency control on shared filesystems or multi-user environments are at risk. Exploitation could lead to denial of service by causing lock failures, potentially disrupting critical processes that depend on file locking for data consistency. Additionally, the integrity of files could be compromised if locks are redirected to unintended files, possibly leading to data corruption or unauthorized file modifications. Sectors with high reliance on Python automation, data processing, or multi-user systems—such as finance, healthcare, and research institutions—may face operational disruptions. The requirement for local access and symlink creation permissions reduces the risk of remote exploitation but highlights the importance of internal security controls. Attackers with insider access or compromised local accounts could leverage this vulnerability to escalate impact. Overall, the vulnerability poses a moderate risk to confidentiality (none), integrity (low), and availability (high) of affected systems.

Mitigation Recommendations

European organizations should immediately upgrade all instances of the filelock package to version 3.20.3 or later to apply the official patch. In environments where immediate upgrade is not feasible, implement strict filesystem permissions to restrict symlink creation rights to trusted users only. Employ monitoring and alerting for unusual symlink creation activities in directories where lock files reside. Use containerization or sandboxing to isolate applications using filelock, limiting the potential impact of local exploits. Conduct regular audits of Python dependencies and enforce secure coding practices to avoid TOCTOU vulnerabilities. For critical systems, consider implementing additional locking mechanisms or using alternative libraries with proven resistance to race conditions. Educate developers and system administrators about the risks of TOCTOU race conditions and the importance of timely patching. Finally, review internal access controls to minimize the number of users with local filesystem privileges that could be exploited.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-08T19:23:09.856Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6961ed34c540fa4b542a0971

Added to database: 1/10/2026, 6:09:56 AM

Last enriched: 1/17/2026, 7:55:22 AM

Last updated: 2/7/2026, 5:09:50 PM

Views: 88

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats