# filelock (PyPI)

A platform independent file lock.

- Latest: 4.3.2 (2026-11-27)
- Licence: MIT
- Downloads: 638860092 last month
- Advisories on the latest version: 0

- CVE-2026-112908 MODERATE: filelock: StrictSoftFileLock creates its claim directories without the lock mode, so another local user with a write bit on them can end a live hold Fixed in 4.2.1.
- CVE-2026-112909 MODERATE: filelock: UnixFileLock truncates and chmods any regular file another user renames or hard-links onto the lock path Fixed in 4.2.1.
- CVE-2026-112910 MODERATE: filelock: WindowsFileLock ignores mode: a 0o600 lock file and the ReadWriteLock database inherit the directory ACL Fixed in 4.2.1.
- CVE-2026-112911 MODERATE: filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion Fixed in 4.2.1.
- CVE-2026-112912 LOW: filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker Fixed in 4.2.1.
- CVE-2026-112915 MODERATE: filelock ReadWriteLock: a crafted lock database makes every acquire stall or hang regardless of timeout Fixed in 4.2.1.
- CVE-2026-112934 MODERATE: filelock: SoftReadWriteLock holder refresh writes through a hard link and hangs on a named pipe that another local user renames over its record Fixed in 4.2.1.
- CVE-2026-112935 MODERATE: filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders Fixed in 4.2.1.
- CVE-2026-112936 MODERATE: filelock: ReadWriteLock follows a symlink at the lock path into SQLite Fixed in 4.0.9.
- CVE-2026-112938 MODERATE: filelock: StrictSoftFileLock follows a symbolic link swapped in at <path>.filelock and creates claim files in a directory another local user chooses Fixed in 4.2.1.
- CVE-2026-112939 MODERATE: filelock: SoftFileLock removes a live holder's marker when another user forges the PID in a writable marker Fixed in 4.2.1.
- CVE-2026-112941 LOW: filelock: SoftReadWriteLock follows a lock tree swapped in after its first acquire and writes lock records into directories of the user running the lock Fixed in 4.2.1.
- CVE-2026-112906 MODERATE: filelock: SoftFileLock evicts a fresh lock file whose watched age another local user's pre-dated file passed on through inode reuse Fixed in 4.2.1.
- CVE-2026-112907 LOW: filelock: On Windows an oplock on a soft lock's marker holds SoftFileLock.acquire() past its timeout and blocks the stale break Fixed in 4.2.1.
- CVE-2026-112913 LOW: filelock: ReadWriteLock on Windows acts on SQLite side files another local user places beside its database Fixed in 4.2.1.
- CVE-2026-112914 MODERATE: filelock: SoftFileLock stale-break restore follows a swapped-in symbolic link and hard-links a file of the user running the lock into the lock directory Fixed in 4.2.1.
- CVE-2026-112937 MODERATE: filelock: ReadWriteLock on the hard-link route deletes any directory another user renames onto its .filelock-* link directory name Fixed in 4.2.1.
- CVE-2026-112940 HIGH: filelock ReadWriteLock: SQLite reopens the lock database by name, so a planted symlink or journal file makes the lock user's process overwrite or unlink its own Fixed in 4.2.1.
- CVE-2026-22701 : filelock Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock Fixed in 3.20.3.
- CVE-2025-68146 : filelock has a TOCTOU race condition which allows symlink attacks during lock file creation Fixed in 3.20.1.
- CVE-2026-22701 MODERATE: filelock Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock Fixed in 3.20.3.
- CVE-2025-68146 MODERATE: filelock has a TOCTOU race condition which allows symlink attacks during lock file creation Fixed in 3.20.1.

Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.
