PyPI: filelock
CVE-2026-112911
Safety vulnerability ID: SFTY-20261020-25530
Affected versions of the `filelock` package are vulnerable to Unverified Ownership due to adopting an existing protocol directory without checking which user created it. The `StrictSoftFileLock` class from 3.30.0 and the `SoftReadWriteLock` class from 4.0.0 reuse a protocol directory in a shared parent directory even when another local user created it first. A local attacker who creates that directory before the victim can alter the protocol state and admit concurrent lock holders, which breaks the mutual exclusion the lock is meant to guarantee.
Overview
filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion
Advisory
filelock – Unverified Ownership
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20261020-25530/CVE-2026-112911
- https://github.com/tox-dev/filelock/security/advisories/GHSA-9c4x-gm8v-wgc4
- https://nvd.nist.gov/vuln/detail/CVE-2026-112911
- https://github.com/tox-dev/filelock/pull/839
- https://github.com/tox-dev/filelock/commit/bfa066d65a1ba9106f86ee9d027f7588b9c77e03
- https://github.com/tox-dev/filelock/releases/tag/4.2.1
- https://github.com/advisories/GHSA-9c4x-gm8v-wgc4
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
