PyPI: filelock

CVE-2026-112934

Safety vulnerability ID: SFTY-20261020-78849

Affected versions of the `filelock` package are vulnerable to UNIX Hard Link due to refreshing holder records by name without verifying the file the name now resolves to. `SoftReadWriteLock` refreshes its holder records by path, so a record replaced between refreshes is opened and written without any check on what the name points to. A local attacker with rename access to the lock directory can substitute a named pipe to stall the lock or, under a permissive hard link policy, link a reachable target file so that the lock user writes through it.

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

Overview

filelock: SoftReadWriteLock holder refresh writes through a hard link and hangs on a named pipe that another local user renames over its record

Advisory

filelock – UNIX Hard Link

Affected Package

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