All vulnerabilities

PyPI

CVE-2026-112915

filelock ReadWriteLock: a crafted lock database makes every acquire stall or hang regardless of timeout

Severity
Medium 5.5
Published
28 Oct 2026
Last changed
28 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
4.2.1
Exploit chance
0.2% in the next 30 daysHigher than 12% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)
Attack
Needs local access · Needs a user account · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-cwqr-hh33-gh44
Sources
OSV.dev and GitHub

Description

ReadWriteLock and AsyncReadWriteLock (the SQLite-backed reader/writer lock) run PRAGMA journal_mode=MEMORY on a fresh connection for every acquire. That statement makes SQLite load the whole schema (the sqlite_master table, which lists every table and index with its CREATE text) of whatever file sits at the lock path. The caller's timeout reaches SQLite only as busy_timeout, which bounds waits for another connection's lock, not schema loading. The only content checks reject non-regular files and WAL mode (write-ahead log, an SQLite mode that keeps changes in a side file). A local user who can place or overwrite the file at a ReadWriteLock's database path can therefore make every acquire_read / acquire_write of every process using that lock ignore its timeout and blocking=False. That position needs a non-sticky shared directory, or a database owned by the user running the lock (below: the lock user) that other users may write.

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

About filelock

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

References