PyPI
CVE-2026-112936
filelock: ReadWriteLock follows a symlink at the lock path into SQLite
- Severity
- Medium 6.1
- Published
- 28 Oct 2026
- Last changed
- 28 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 4.0.9
- Exploit chance
- 0.2% in the next 30 daysHigher than 14% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Needs local access · Needs a user account · No user action needed
- Attacker can
- Change data · Slow it down
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L- Also known as
- GHSA-j8f7-rjxc-mr56
- Sources
- OSV.dev and GitHub
Description
ReadWriteLock and AsyncReadWriteLock resolve the lock path with pathlib.Path.resolve() and pass it to sqlite3.connect() without refusing a symlink. A local user who can create names in the lock's directory, such as /tmp or a shared cache, can plant a symlink at the lock path and make the victim's process create, lock, or write the file it points to, or break mutual exclusion between the victim's own processes.
ReadWriteLock.init stores pathlib.Path(lock_file).resolve(), which follows a final symlink, and every connection opens that path through sqlite3.connect() with no O_NOFOLLOW or regular-file check. SQLite's own VFS also resolves the final symlink in user space, so fs.protected_symlinks and the sticky bit do not help: the kernel never sees a symlink to refuse. The other lock classes do not follow a final symlink: FileLock opens with O_NOFOLLOW, and SoftReadWriteLock coordinates through .rw/.
Workarounds
Keep ReadWriteLock paths in directories that only trusted users can write.
Affected software
| Software | Affected versions |
|---|---|
filelockPyPI · osv:PyPI:filelock |
|
About filelock
- Weekly downloads (PyPI)
- 151,687,068PyPI Stats, 23 Nov 2026
Vulnerabilities in filelock
- In our list
- 12
- Published in the last 12 months
- 12
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-112941filelock: SoftReadWriteLock follows a lock tree swapped in after its first acquire and writes lock records into directories of the user running the lockLow 3.3 28 Oct 2026
- CVE-2026-112908filelock: StrictSoftFileLock creates its claim directories without the lock mode, so another local user with a write bit on them can end a live holdMedium 5.3 28 Oct 2026
- CVE-2026-112911filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusionMedium 6.3 28 Oct 2026
- CVE-2026-112910filelock: WindowsFileLock ignores mode: a 0o600 lock file and the ReadWriteLock database inherit the directory ACLMedium 5.3 28 Oct 2026
- CVE-2026-112915filelock ReadWriteLock: a crafted lock database makes every acquire stall or hang regardless of timeoutMedium 5.5 28 Oct 2026
- CVE-2026-112939filelock: SoftFileLock removes a live holder's marker when another user forges the PID in a writable markerMedium 4.7 28 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-112936
- GitHub Advisory Database https://github.com/advisories/GHSA-j8f7-rjxc-mr56