Intel

AIKIDO-2026-444439

filelock is vulnerable to Link Following

CVE-2026-112936Published Oct 15, 2026
October 15, 2026

59

CVE Score

Medium

Link Following

Are you affected? Scan for Free

TL;DR

ReadWriteLock and AsyncReadWriteLock resolve their SQLite lock-database path with pathlib.Path(lock_file).resolve() and open it with a plain sqlite3.connect() call, both of which follow symbolic links. A user who can create or replace a name inside a shared lock directory plants a symlink at the lock path before the victim constructs the lock, redirecting the victim's lock database to a different file and defeating the mutual-exclusion guarantee, or substitutes a non-regular file such as a FIFO at that path. The fix opens the database through a descriptor obtained with O_NOFOLLOW (or a non-reparse-point handle on Windows), rejects non-regular files, and pins SQLite to that already-validated descriptor.

How do I fix this?

Upgrade the filelock library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use ReadWriteLock or AsyncReadWriteLock with a lock file path inside a directory writable by other untrusted local users or processes.

Package

Versions

3.20.4 - 4.0.8

Fixed in 4.0.9

Background info

filelock is vulnerable to Link Following in versions 3.20.4 - 4.0.8.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea