CVE-2026-144393: filelock: SoftReadWriteLock admits overlapping writers through a moved writable tree
Impact
On POSIX, SoftReadWriteLock can accept a protocol directory whose owner it trusts but whose permissions allow another account to write. In a shared sticky lock location, an account with control over such a directory can cause two processes to hold write locks concurrently without a compromise notification.
Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Filelock now checks the ownership and permissions of every protocol directory against the sticky lock parent and rejects unsafe trees. Use a private lock directory. If an unsafe tree already exists, stop all clients before removing it and letting filelock recreate it. Fix in PR #988.
Credits
OSS Scanner: ANT-2026-UHV8G0TA.
Other sources
filelock is a platform-independent file lock for Python. Prior to 4.3.0, on POSIX, SoftReadWriteLock can accept a protocol directory whose owner it trusts but whose permissions allow another account to write. In a shared sticky lock location, an account with control over such a directory can cause two processes to hold write locks concurrently without a compromise notification. This issue is fixed in version 4.3.0.
— OSV
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/python-filelockto a version that resolves this vulnerability.Fixed in 4.3.1-1 - Upgrade
Upgrade
pip/filelockto a version that resolves this vulnerability.Fixed in 4.3.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.3.0 - Compensating control
Use a private lock directory.
- Operational
If an unsafe protocol directory already exists, stop all clients before removing it and letting filelock recreate it.
Event History
Frequently Asked Questions
Who is exposed to this issue?
POSIX deployments using SoftReadWriteLock before version 4.3.0 are exposed when their lock location is shared and sticky, and a protocol directory is owned by a trusted account but writable by another account. A local account able to control that writable directory can trigger the condition.
What does an attacker need to exploit it?
The attacker needs local access and control over a protocol directory in the shared sticky lock location that is trusted by the lock owner but permits the attacker to write to it. Exploitation causes overlapping write locks without a compromise notification.
Are default configurations affected?
The issue depends on a specific unsafe directory-permission arrangement in a shared sticky lock location. The provided information does not establish that default configurations create this arrangement.
What should be done if upgrading is not immediately possible?
Restrict write access to protocol directories used by SoftReadWriteLock so that no other account can write to a directory trusted by the lock owner. Avoid shared sticky lock locations with protocol directories that have unsafe permissions.