ReadWriteLock can delete a private file from a leftover SQLite journal
Description
Impact
A ReadWriteLock database can retain an untrusted SQLite journal after its directory changes from shared to private. Opening the database can delete an unrelated file that the locking account has permission to read and remove. Changing directory permissions does not remove existing journals.
Affected versions and fix
The confirmed affected version is 4.2.12. Upgrade to filelock 4.3.0 or later. When SQLite side files are present, the lock opens the database through a private hard link. PR #976
Workaround
Before upgrading, use a fresh private lock directory and database. Coordinate the move with all participants while no lock is held.
Credits
Reported by OSS Scanner (ANT-2026-J39GB53S).