filelock: ReadWriteLock can overwrite victim-owned files through a directory swap
GHSA-22wc-j8c9-7gxg · CVE-2026-144395
Published · Modified
AI SAST
Find this class of vulnerability in your own code
Corgea's AI-native static analysis detects vulnerabilities like this one across your repositories, ranks them by exploitability, and returns review-ready fixes.
Description
Impact
On POSIX, another account with rename access in a shared, non-sticky lock directory can redirect a SQLite-backed ReadWriteLock operation to a file writable by the locking process. A cross-account overwrite was confirmed on Linux. The affected setup also required a victim-owned directory that the other account could previously read.
Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Filelock now creates the final database link inside a fresh owner-only directory, verifies its permissions and requires the link to exist when SQLite opens it. Upgrade every process sharing the database before resuming operations. Until then, keep its parent writable only by the locking account or use a sticky shared parent. Fix in PR #1096.
Credits
OSS Scanner: ANT-2026-XYOWG885.
References
- WEB https://github.com/tox-dev/filelock/security/advisories/GHSA-22wc-j8c9-7gxg
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-144395
- WEB https://github.com/tox-dev/filelock/pull/1096
- WEB https://github.com/tox-dev/filelock/commit/d7324f591a2532e28427dae342d73680cc4cf6e7
- PACKAGE https://github.com/tox-dev/filelock
- WEB https://github.com/tox-dev/filelock/releases/tag/4.3.0
Ready to move
Start Securing
Free, no credit card | First findings in minutes