Cloudanix VulnDB

CVE-2026-112935

Medium · 4.7

CVSS

4.7

EPSS

0.1%

Published

Oct 20, 2026

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A Python library used to prevent two programs from editing the same file at once can fail under certain timing conditions, allowing both programs to proceed and potentially damage data.

Exploit Available
Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
High
Impact
Data Tampering
Component
Library
Class
Race Condition
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

SoftFileLock in filelock 3.22.0-4.2.0 permits a race where an attacker can delete its own stale lock marker after the honest process has read it but before it can validate the successor marker's timestamp, allowing two processes to hold the lock simultaneously on the same inode.

Why it matters to the business

Applications relying on file-based locking for exclusive access may experience data corruption or inconsistent state when multiple processes write to the same resource at once, increasing operational risk for any Python software using the library until upgraded.

How an attack unfolds

An attacker with local access observes or forces creation of a stale lock file, releases their marker after the victim reads it, then races to create a new lock whose mtime is not strictly newer than the victim's saved observation, tricking the victim into removing the live lock and allowing concurrent access.

How to fix it

Upgrade filelock to version 4.2.1 or later for all affected installations; until then, switch to the platform-native FileLock implementation or add external synchronization.

How to confirm the fix worked

Confirm filelock >= 4.2.1 is installed via pip show or package metadata; run the library's regression tests for SoftFileLock under concurrent load; monitor for duplicate lock acquisitions in application logs.

Typical attack path

  1. Identify Python process using filelock SoftFileLock on a shared path
  2. Create or wait for a stale lock marker on the target inode
  3. Release attacker marker after victim reads the stale state
  4. Immediately acquire a new lock whose mtime satisfies the victim's timestamp check
  5. Trigger the victim to delete the new lock marker, resulting in dual holders

How to detect it

Review application and system logs for concurrent write attempts or lock-acquisition failures around the affected library; look for processes holding duplicate file locks on the same path via lsof or equivalent tooling.

What your security team should do

  • Immediately inventory all Python environments for filelock versions < 4.2.1
  • Prioritize upgrade to 4.2.1 in high-concurrency or data-integrity sensitive workloads
  • Temporarily replace SoftFileLock usage with FileLock or external locking primitives
  • Add dependency pinning and automated scanning to prevent regression

The record

filelock is a platform-independent file lock for Python. From 3.22.0 until 4.2.1, SoftFileLock can break a stale marker after an attacker frees its own marker following the stale read, an honest contender creates a live successor on the reused inode, and the successor's modification time is not newer than the saved observation, causing the live marker to be removed and two holders to be admitted. This issue is fixed in version 4.2.1.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities