PyPI: filelock

CVE-2026-112912

Safety vulnerability ID: SFTY-20261020-34461

Affected versions of the `filelock` package are vulnerable to Link Following due to a writability check that follows a symbolic link swapped in by another user. `SoftFileLock` calls `os.access` to check whether a lock node without its owner write bit is writable, and that conditional check resolves a symbolic link that another local user can swap in at the lock path. On a platform and directory configuration that follows the link, a local attacker can read the observable acquisition result to infer whether a chosen path exists and is writable by the lock user, disclosing file system information.

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

Overview

filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker

Advisory

filelock – Link Following

Affected Package

Affecting filelock package, versions>=3.32.6,<=4.2.0

Also affects

---

How to Fix

Upgradefilelockto4.2.1or 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