LOW 2.5 PyPI

filelock: SoftReadWriteLock heartbeat overwrites victim-owned files after inode reuse

GHSA-x3f4-g3q6-f985 · CVE-2026-144386

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

A SoftReadWriteLock heartbeat can overwrite the beginning of an unrelated file with holder-record data. This requires a shared directory where another account can rename entries and a filesystem that reuses inode numbers. The overwrite was confirmed on ext4.

Affected versions and fix

The confirmed affected version is 4.2.12. Upgrade to filelock 4.3.0 or later. The heartbeat verifies the holder token on the open descriptor before writing. A mismatch marks the hold as lost. The fix does not protect a lock directory that another account can replace. PR #982

Workaround

Keep the lock and its records in a directory where only trusted accounts can rename entries.

Credits

Reported by OSS Scanner (ANT-2026-CC0VMGLC).

Ready to move

Start Securing

Free, no credit card | First findings in minutes