filelock: ReadWriteLock follows a symlink at the lock path into SQLite
CVE-2026-112936
Summary 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. Details ReadWriteLock.init stores pathlib.Path(lockfile).resolve(), which follows a final symlink, and every connection opens that path through sqlite3.connect() with no ONOFOLLOW or regular-file check. SQLite's own VFS also resolves the final symlink in user space, so fs.protectedsymlinks 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 ONOFOLLOW, and SoftReadWriteLock coordinates through .rw/. Proof of concept On Linux, with the victim and attacker as different users and /shared mode 1777 with fs.protectedsymlinks=1: 1. The attacker runs ln -s /home/victim/private/pwned.flag /shared/app.rwlock.db. 2. The victim constructs ReadWriteLock("/shared/app.rwlock.db"). A…
Assessment
- CVSS
- 6.1 (v3.1)
- Severity
- Medium
- EPSS
- 0.00232% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 28 October 2026
- Last updated
- 28 October 2026
- Affected
- pip · filelock
- Weakness
- CWE-59, CWE-668
CVSS vectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
At the source
References
- https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56
- https://nvd.nist.gov/vuln/detail/CVE-2026-112936
- https://github.com/tox-dev/filelock/commit/4d45e83caf7e31f9a12fb44526bdc07f70114f04
- https://github.com/tox-dev/filelock/releases/tag/4.0.9
- https://github.com/advisories/GHSA-j8f7-rjxc-mr56
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-112936