All vulnerabilities

PyPI

CVE-2026-112911

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

Severity
Medium 6.3
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 3% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-283
Attack
Needs local access · Only under certain conditions · Needs a user account · No user action needed
Attacker can
Change data · Take it down
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H
Also known as
GHSA-9c4x-gm8v-wgc4
Sources
OSV.dev and GitHub

Description

StrictSoftFileLock, AsyncStrictSoftFileLock, SoftReadWriteLock and AsyncSoftReadWriteLock keep their whole ownership state as files in a directory derived from the lock path (.filelock/claims, .rw/{gen,holders}). When that directory already exists they adopt it after checking only that it is a real directory, not who owns it. Another local user who can create names in the lock's directory can create the tree before the first acquire on that path by the user running the lock (below: the lock user). In /tmp, /var/tmp or another sticky shared directory any user can do that; the sticky bit is a directory flag that lets only a file's owner remove or rename it. The other user then owns the tree. They can unlink the lock user's claims while the lock user holds the lock, so a second process of the lock user, root included, enters the same critical section and neither process sees an error.

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.30.0 before 4.2.1

About filelock

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

References