Symlink Attack Affecting filelock package, versions [3.20.4,4.0.9)


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.23% (14th 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-21280754
  • published20 Oct 2026
  • disclosed20 Oct 2026
  • creditKevin Stubbings

Introduced: 20 Oct 2026

NewCVE-2026-112936  (opens in a new tab)
CWE-59  (opens in a new tab)

How to fix?

Upgrade filelock to version 4.0.9 or higher.

Overview

Affected versions of this package are vulnerable to Symlink Attack via ReadWriteLock in src/filelock/_read_write.py, which resolves the lock file path using Path.resolve() before passing it to sqlite3.connect(). An attacker who can plant a symlink in a shared lock directory can cause the victim process to open, lock, or create the symlink's target instead of the intended lock file. By repointing the symlink between two lock constructions, two writers can simultaneously hold the lock, breaking mutual exclusion and allowing unauthorized file writes.

CVSS Base Scores

version 4.0
version 3.1