PyPI: filelock

CVE-2026-112936

Safety vulnerability ID: SFTY-20261020-11422

Affected versions of the `filelock` package are vulnerable to Link Following due to passing the resolved lock path to SQLite without rejecting a final symbolic link. `ReadWriteLock` and `AsyncReadWriteLock` resolve the lock path and hand it to SQLite, which follows a symbolic link placed as the last component of that path. A local attacker who can create names in the lock directory can redirect database creation and locking to another file, or split mutual exclusion between two targets so that processes holding what they believe is the same lock are locking different files.

Created at: Oct 28, 2026Updated at: Oct 28, 2026

Overview

filelock: ReadWriteLock follows a symlink at the lock path into SQLite

Advisory

filelock – Link Following

Affected Package

Affecting filelock package, versions>=3.20.4,<=4.0.8

Also affects

---

How to Fix

Upgradefilelockto4.0.9or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more