Skip to main content
Menu
Advisories

ReadWriteLock can overwrite victim-owned files through a directory swap

GHSA-22WC-J8C9-7GXGPublished Updated GitHub

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.

Affected versions

References

GitHub · tox-dev/filelock