Skip to main content

CVE-2026-112937: CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition in tox-dev filelock

0
Medium
VulnerabilityCVE-2026-112937cvecve-2026-112937cwe-367
Published: 10/20/2026 (10/20/2026, 14:36:28 UTC)
Source: CVE Database V5
Vendor/Project: tox-dev
Product: filelock

Description

A TOCTOU race condition vulnerability exists in the tox-dev filelock Python package versions 4.1.0 through 4.2.0. The ReadWriteLock component can remove a randomized .filelock-* private-hard-link directory during cleanup, which allows a local user with rename access in a non-sticky parent directory to interfere with file locking by observing or forging directory names. This issue is fixed in version 4.2.1.

CVSS v3.1

Score 6.1medium

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

Affected software

tox-dev

filelock

Affected versions
>=4.1.0 <4.2.1
filelock
pkg:pypi/filelock

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/20/2026, 15:18:54 UTC

Technical Analysis

The tox-dev filelock Python package versions from 4.1.0 up to but not including 4.2.1 contain a time-of-check to time-of-use (TOCTOU) race condition in the ReadWriteLock cleanup process. Specifically, the cleanup removes a randomized .filelock-* private-hard-link directory, which can be exploited by a local user who has rename permissions in a non-sticky parent directory. This user can observe a live lock name or forge a dead-owner sweep name and rename a sibling directory onto it for deletion, potentially disrupting file lock integrity. The vulnerability is addressed in version 4.2.1.

Potential Impact

The vulnerability allows a local attacker with rename access in a non-sticky parent directory to interfere with the file locking mechanism by manipulating lock directories. This can lead to unauthorized deletion or renaming of lock directories, impacting the integrity of file locks. The CVSS score of 6.1 reflects a medium severity with no confidentiality impact, but high integrity impact and low availability impact.

Mitigation Recommendations

Upgrade tox-dev filelock to version 4.2.1 or later, where this TOCTOU race condition vulnerability is fixed. No other mitigation is indicated or required according to the available data.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-19T21:30:47.244Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ad782ec2cdf04f65638aa3f

Added to database: 10/20/2026, 15:04:12 UTC

Last enriched: 10/20/2026, 15:18:54 UTC

Last updated: 10/20/2026, 19:06:08 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses