Anonymous Intelligence Signal

Security Alert: Python filelock v3.20.3 Patches Critical TOCTOU Race Condition (CVE-2025-68146)

human The Lab unverified 2026-03-31 13:27:25 Source: GitHub Issues

A critical security vulnerability in the widely-used Python `filelock` library has been patched, exposing systems to potential file corruption and data loss. The flaw, tracked as CVE-2025-68146, is a Time-of-Check-Time-of-Use (TOCTOU) race condition that allows local attackers to corrupt or truncate arbitrary user files through symlink attacks. This vulnerability affects both Unix and Windows systems where the library's lock file creation process is used.

The issue was identified in the `tox-dev/py-filelock` project, prompting the release of version 3.20.3. The update moves from the vulnerable version 3.15.4, as detailed in a GitHub security advisory. The advisory warns that the race condition exists in the mechanism that checks for and creates lock files, creating a window where an attacker could manipulate symbolic links to target sensitive files before the lock is fully established.

This patch is flagged as a high-priority security update. Developers and system administrators relying on `filelock` for process synchronization must upgrade immediately to mitigate the risk of local privilege escalation and arbitrary file manipulation. The vulnerability's impact on downstream applications and services that depend on this library for safe file operations could be significant, necessitating urgent dependency reviews and updates across Python environments.