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.
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
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20261020-34461/CVE-2026-112912
- https://github.com/tox-dev/filelock/security/advisories/GHSA-9j6q-wvj5-jgjg
- https://nvd.nist.gov/vuln/detail/CVE-2026-112912
- https://github.com/tox-dev/filelock/pull/835
- https://github.com/tox-dev/filelock/commit/e1e825b1992f69fb6b346dc395d5ae4893536c0a
- https://github.com/tox-dev/filelock/releases/tag/4.2.1
- https://github.com/advisories/GHSA-9j6q-wvj5-jgjg
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
