CVE-2026-112941: CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition in tox-dev filelock
Description
CVE-2026-112941 is a low-severity TOCTOU race condition vulnerability in the tox-dev filelock Python library versions 4.1.0 through 4.2.0. The issue involves caching of a successful check on the .rw lock tree path, which can be replaced by another local user after the initial acquisition. This allows redirection of lock-record writes into directories writable by the lock user. The vulnerability is fixed in version 4.2.1.
CVSS v3.1
Score 3.3low
Affected software
tox-dev
filelock
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The filelock library for Python, used for platform-independent file locking, contained a time-of-check to time-of-use (TOCTOU) race condition in the SoftReadWriteLock and AsyncSoftReadWriteLock classes from versions 4.1.0 up to but not including 4.2.1. These classes cache the result of a successful check on the <path>.rw lock tree and later resolve its names again during record operations. This caching allows a local attacker who can replace the lock tree after the first acquisition to redirect lock-record writes into directories writable by the lock user. This behavior could lead to unintended modification of files or directories. The issue is resolved in version 4.2.1.
Potential Impact
The vulnerability allows a local user with the ability to replace the lock tree directory after initial acquisition to redirect lock-record writes into directories writable by the lock user. This can lead to integrity issues by enabling unauthorized modification of files or directories. The CVSS score of 3.3 reflects a low severity impact with limited scope and no confidentiality or availability impact.
Mitigation Recommendations
Upgrade to tox-dev filelock version 4.2.1 or later, where this TOCTOU race condition has been fixed. No other mitigation is indicated or necessary as the fix is available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-19T21:30:47.245Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ad782ec2cdf04f65638aa42
Added to database: 10/20/2026, 15:04:12 UTC
Last enriched: 10/20/2026, 15:18:46 UTC
Last updated: 10/20/2026, 19:06:08 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.