Race Condition Enabling Link Following Affecting filelock package, versions [3.20.4,4.2.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.12% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-FILELOCK-21280753
  • published20 Oct 2026
  • disclosed20 Oct 2026
  • creditAnthropic's OSS Scanner

Introduced: 20 Oct 2026

NewCVE-2026-112940  (opens in a new tab)
CWE-363  (opens in a new tab)

How to fix?

Upgrade filelock to version 4.2.1 or higher.

Overview

Affected versions of this package are vulnerable to Race Condition Enabling Link Following via the read-write lock implementation in src/filelock/_read_write.py, where the SQLite lock database is opened using a shared, predictable name in a directory where another user can manipulate names. An attacker who controls names in the lock database's directory can redirect the lock file path to an arbitrary location, allowing them to corrupt or overwrite files with the victim's privileges.

Note: This is only exploitable when another user has write access to the directory containing the lock database.

CVSS Base Scores

version 4.0
version 3.1