6.5

CVE-2025-68146: filelock has TOCTOU race condition that allows symlink attacks during lock file creation

Analyzed
AliasesSUSE-SU-2026:0082-1GHSA-w853-jp5j-5j7fPYSEC-2026-1375
Published 16-12-2025Last modified 17-12-2025

Vulnerability summary

CVE-2025-68146 is a medium (CVSS 6.5) vulnerability in tox-dev filelock. EPSS estimates a 0.20% chance of exploitation in the next 30 days, higher than 10.9% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 6.3, local access); no exploitation reported by the 5 checked sources

CIRCL last checked 05-12-2026

Source freshness unavailable

How is this decided?
CVSS score
6.5/10
010
Medium · v3.1 (NVD)
EPSS score
0.20%
0%100%
Low · +0.01 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 5 · Related 11

Timeline

  1. 16-12-2025
    PublishedVulnerability first disclosed.
  2. 17-12-2025
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

0.20%

Chance of exploitation in the next 30 days

Percentile

11%

Versus all other CVEs

30-day change

Increase +0.01 pp

From 0.20% on 05-11-2026

05-11-202605-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Filelock

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard36 products
  • airflow-2< 2.11.0-r17
  • airflow-2-bitnami-compat< 2.11.0-r17
  • airflow-2-compat< 2.11.0-r17
  • airflow-2-iamguarded-compat< 2.11.0-r17
  • airflow-3< 3.1.5-r0
Wolfi21 products
  • airflow-3< 3.1.5-r0
  • airflow-3-bitnami-compat< 3.1.5-r0
  • airflow-3-compat< 3.1.5-r0
  • airflow-3-iamguarded-compat< 3.1.5-r0
  • datadog-agent-7.72-core-integrationsAll versions (No fix recorded)
Opensuse2 products
  • ansible-lint&distro=openSUSE Tumbleweed< 26.11.0-2.1
  • python-filelock&distro=openSUSE Tumbleweed< 3.20.2-1.1
Suse2 products
  • python-filelock&distro=SUSE Linux Enterprise Module for Development Tools 15 SP7< 3.0.12-150100.3.6.1
  • python-filelock&distro=SUSE Linux Enterprise Module for Package Hub 15 SP7< 3.0.12-150100.3.6.1
Debian1 product
  • python-filelock< 3.9.0-1+deb12u1 | < 3.18.0-1+deb13u1 | < 3.20.2-1
PyPI1 product
  • filelock< 3.20.1
Tox-dev1 product
Ubuntu1 product
  • python-filelockAll versions (No fix recorded) | < 3.0.4-1ubuntu0.1~esm1 | < 3.6.0-1ubuntu0.1~esm1 | < 3.13.1-1ubuntu0.1~esm1

8 vendors · 65 products

References

18 links
Show all 18 references