CVE-2026-112909
Medium · 6.1CVSS
6.1
EPSS
0.2%
Published
Oct 20, 2026
CISA due date
—
Cloudanix analysis
A Python library used for safely locking files has a flaw that lets another user on the same computer tamper with those files under certain conditions, potentially breaking applications or allowing unauthorized changes.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
UnixFileLock in filelock can truncate a target file or alter its permissions when a local attacker with rename or hard-link privileges races to place a file on the lock path, due to unsafe handling of file operations without proper atomicity checks.
Why it matters to the business
Attackers on the same system could corrupt or modify configuration and data files managed by Python applications using this library, leading to service disruption, unauthorized changes, or data integrity loss in shared environments.
How an attack unfolds
A local attacker creates or renames a file onto the intended lock path or hard-links under permissive policies, then triggers the lock acquisition in the vulnerable application; when an explicit mode is set, the file's permissions can also be changed. Public exploit code is available, though no named threat actors or ransomware use have been observed.
How to fix it
Upgrade filelock to version 4.2.1 or later on all affected systems. Where immediate upgrade is not possible, restrict local user permissions on lock file paths and avoid explicit mode requests in lock usage.
How to confirm the fix worked
Verify the installed filelock package version is 4.2.1 or higher using package managers or dependency scanners. Review application code for UnixFileLock usage and test lock behavior under concurrent rename scenarios in a controlled environment.
Typical attack path
- Identify a Python process using filelock on a Unix system with the vulnerable library version.
- Obtain local user access with rename or hard-link permissions on the target path.
- Race the file placement onto the lock path before the application acquires the lock.
- Trigger lock operations to cause truncation or mode change on the attacker's file.
- Abuse the resulting file state for further impact such as configuration tampering.
How to detect it
Search application and system logs for unexpected file truncation or permission changes on paths used by filelock. Review process creation events and file access patterns around Python processes for anomalies indicating race conditions or local file manipulation.
What your security team should do
- Prioritize upgrading all instances of filelock to 4.2.1 within the next patch cycle due to available public exploits.
- Audit Python dependency trees for filelock usage across development and production environments.
- Implement filesystem permissions hardening on paths used for file locking.
- Monitor for new releases and apply updates promptly given the nine-day publication window.
The record
filelock is a platform-independent file lock for Python. Prior to 4.2.1, UnixFileLock can truncate a regular file renamed onto the lock path when another local user has actual rename permission, or hard-linked there under a permissive hard-link policy; when an explicit mode is requested, affected versions from 3.10.2 can also change that file's mode. This issue is fixed in version 4.2.1.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-118938 In Trail of Bits fickling through 0.1.12, a pickle STACK_GLOBAL operand carrying a dotted… CWE-706
- CVE-2026-89313 `JwksTrustStore.Get` assigned each parsed key to the function's **named return value**… CWE-706
- CVE-2026-114663 Vyper 0.4.0b1 through 0.5.0b1 miscompiles unfoldable constants and omitted default… CWE-706
- CVE-2026-14288 GitLab has remediated an issue in GitLab EE affecting all versions from 17.4 before… CWE-706
- CVE-2026-92262 MariaDB server is a community developed fork of MySQL server. CWE-706
- CVE-2026-107822 MariaDB server is a community developed fork of MySQL server. CWE-706
- CVE-2026-92951 vm2 before 3.11.7 contains an incorrect authorization vulnerability in the external… CWE-706
- CVE-2026-87618 Incorrect reference resolution in Storage in Google Chrome on on Windows prior to… CWE-706