filelock: ReadWriteLock can remove unrelated empty directories
GHSA-jcf5-mpj4-xfg8 · CVE-2026-144349
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, ReadWriteLock can remove empty directories from an unrelated directory owned by the locking account. This requires a shared parent without the sticky bit where another local account can rename directories. The confirmed impact is confined to empty directories.
Affected versions and fix
Versions 4.2.1 through 4.2.12 are affected. Upgrade to filelock 4.3.0 or later. Cleanup verifies that it removed a link to the lock database before removing directories. An interrupted acquisition can leave an empty directory behind without blocking future acquisitions. PR #973
Workaround
Use a parent directory where untrusted accounts cannot rename entries.
Credits
Reported by OSS Scanner (ANT-2026-KHP4PR98).
References
- WEB https://github.com/tox-dev/filelock/security/advisories/GHSA-jcf5-mpj4-xfg8
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-144349
- WEB https://github.com/tox-dev/filelock/pull/973
- WEB https://github.com/tox-dev/filelock/commit/f000cc7dc095718273ae26c959072c0d9a50ff7d
- 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