Read the docs
TI-2025-41727 Aliases CVE-2025-68146GHSA-w853-jp5j-5j7f

filelock has TOCTOU race condition that allows symlink attacks during lock file creation

Priority LOW 28CWE-362Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
Low · High · High
Fix status
Partial Red Hat: 14 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat.

Summary

filelock is a platform-independent file lock for Python. In versions prior to 3.20.1, a Time-of-Check-Time-of-Use (TOCTOU) race condition allows local attackers to corrupt or truncate arbitrary user files through symlink attacks. The vulnerability exists in both Unix and Windows lock file creation where filelock checks if a file exists before opening it with O_TRUNC. An attacker can create a symlink pointing to a victim file in the time gap between the check and open, causing os.open() to follow the symlink and truncate the target file. All users of filelock on Unix, Linux, macOS, and Windows systems are impacted. The vulnerability cascades to dependent libraries. The attack requires local filesystem access and ability to create symlinks (standard user permissions on Unix; Developer Mode on Windows 10+). Exploitation succeeds within 1-3 attempts when lock file paths are predictable. The issue is fixed in version 3.20.1. If immediate upgrade is not possible, use SoftFileLock instead of UnixFileLock/WindowsFileLock (note: different locking semantics, may not be suitable for all use cases); ensure lock file directories have restrictive permissions (chmod 0700) to prevent untrusted users from creating symlinks; and/or monitor lock file directories for suspicious symlinks before running trusted applications. These workarounds provide only partial mitigation. The race condition remains exploitable. Upgrading to version 3.20.1 is strongly recommended.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00198 9th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial filelock (tox-dev): 3.20.1filelock (PyPI): 3.20.1Red Hat: 14 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
tox-devfilelockbefore 3.20.13.20.1Patch availableCNA
—filelock (PyPI)before 3.20.13.20.1Patch availableGHSA-w853-jp5j-5j7f
  • filelock Vendortox-dev Affected before 3.20.1 Fixed in 3.20.1 Patch available CNA
  • filelock (PyPI) Vendor— Affected before 3.20.1 Fixed in 3.20.1 Patch available GHSA-w853-jp5j-5j7f

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:tox-dev:filelock:*:*:*:*:*:python:*:*before 3.20.1Vulnerabletox-dev
  • cpe:2.3:a:tox-dev:filelock:*:*:*:*:*:python:*:* Versions before 3.20.1 Vulnerable ·tox-dev

Remediation

  • Fix · CNA filelock (tox-dev) Fixed in 3.20.1
  • Fix · GHSA-w853-jp5j-5j7f filelock (PyPI) Fixed in 3.20.1 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Migration Toolkit for ContainersAffectedNo fix yet: Fix deferred
OpenShift LightspeedAffectedNo fix yet: Fix deferred
OpenShift Service Mesh 2AffectedNo fix yet: Fix deferred
OpenShift Service Mesh 3AffectedNo fix yet: Fix deferred
Red Hat AI Inference ServerAffectedNo fix yet: Fix deferred
Red Hat Ansible Automation Platform 2AffectedNo fix yet: Fix deferred
Red Hat Ansible Automation Platform Ansible Core 2AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux AI (RHEL AI)AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3AffectedNo fix yet: Fix deferred
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet: Fix deferred
Red Hat OpenShift Dev SpacesAffectedNo fix yet: Fix deferred
Red Hat OpenStack Platform 18.0AffectedNo fix yet: Fix deferred
Red Hat Satellite 6AffectedNo fix yet: Fix deferred
Red Hat Trusted Artifact SignerAffectedNo fix yet: Fix deferred

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-68146
  2. 2026-10-03 Alias added: GHSA-w853-jp5j-5j7f

References

  • TI-2026-76862 Symlink race in filelock ReadWriteLock lets attackers overwrite files CVSS 3.1HIGH 7.1
  • TI-2026-76853 filelock soft locks adopt directories created by other local users CVSS 3.1MEDIUM 6.3
  • TI-2026-76859 Symlink following in filelock ReadWriteLock redirects SQLite database CVSS 3.1MEDIUM 6.1
  • TI-2026-76857 Unsafe holder record refresh in filelock SoftReadWriteLock CVSS 3.1MEDIUM 6.1
  • TI-2026-76852 filelock UnixFileLock truncates files placed on the lock path CVSS 3.1MEDIUM 6.1
  • TI-2026-76856 Crafted lock database makes filelock ReadWriteLock acquisitions hang CVSS 3.1MEDIUM 5.5
See all 14 →

Sources