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.

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

Overview

filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion

Advisory

filelock – Unverified Ownership

Affected Package

Affecting filelock package, versions>=3.30.0,<=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