All vulnerabilities

PyPI

CVE-2026-112935

filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders

Severity
Medium 4.7
Published
28 Oct 2026
Last changed
28 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
4.2.1
Exploit chance
0.1% in the next 30 daysHigher than 2% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Time-of-check time-of-use race condition (CWE-367)
Attack
Needs local access · Only under certain conditions · Needs a user account · No user action needed
Attacker can
Change data
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
Also known as
GHSA-fq56-3cx3-fjxp
Sources
OSV.dev and GitHub

Description

The stale-lock break shared by SoftFileLock, MarkerSoftFileLock and SoftFileLease (and their async variants, and a FileLock that has fallen back to a soft lock on ENOSYS, the "not implemented" error) recognises the marker it judged stale by two values. The marker is the lock file at , whose presence says a process holds the lock. The values are its inode number (the kernel's identity for a file, independent of its name) and its modification time (mtime) not being newer. The check runs after the contender has already closed the marker, so nothing keeps the inode allocated.

On a filesystem that hands a freed inode number straight to the next file (ext4, xfs, overlayfs on them) the next holder's marker can carry that number. A contender still between its read and its break then renames and unlinks the live marker.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
filelockPyPI · osv:PyPI:filelock
  • From 3.22.0 before 4.2.1

About filelock

Weekly downloads (PyPI)
151,687,068PyPI Stats, 23 Nov 2026

References