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.
Overview
filelock: ReadWriteLock follows a symlink at the lock path into SQLite
Advisory
filelock – Link Following
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20261020-11422/CVE-2026-112936
- https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56
- https://nvd.nist.gov/vuln/detail/CVE-2026-112936
- https://github.com/tox-dev/filelock/commit/4d45e83caf7e31f9a12fb44526bdc07f70114f04
- https://github.com/tox-dev/filelock/releases/tag/4.0.9
- https://github.com/advisories/GHSA-j8f7-rjxc-mr56
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
