CVE-2026-144386 is a low-severity (CVSS 2.5) CWE-367 vulnerability in filelock. A fix is available for filelock — see the affected versions and patch details below.
filelock: SoftReadWriteLock heartbeat overwrites victim-owned files after inode reuse
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
filelockReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
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).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | filelock | all versions | 4.3.0pip install --upgrade 'filelock==4.3.0' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for filelock, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update filelock to 4.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-144386 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This flaw is rated as Low severity because exploitation requires local access alongside a high-complexity race condition involving shared directory manipulation by an untrusted local user and inode recycling. Standard Red Hat product deployments typically execute Python workloads with restricted file permissions or…
To mitigate this vulnerability, ensure Python applications utilizing `filelock` create lock files within dedicated, user-private directories with restricted file permissions (e.g., directory mode 0700) rather than shared or world-writable locations such as `/tmp`. Where feasible, configure applications to avoid using `SoftReadWriteLock` heartbeats in multi-user shared directory environments. Caveats: Restricting lock file directories requires application path configuration and may require restarting affected application processes for environment variable or configuration changes to take effect.Source: Red Hat security advisory for CVE-2026-144386 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-144386 in your dependencies?
Find it across PyPI, including transitive dependencies.