Cloudanix VulnDB

CVE-2026-112939

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 file-locking library can be tricked by a local user into handing over control of a locked file, potentially breaking safe sharing of resources between programs.

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

What it actually does

SoftFileLock trusts a modifiable but non-removable process identifier in its marker file, allowing an authorized local process to forge the PID, delete the marker as a confused deputy, and acquire the lock.

Why it matters to the business

Applications relying on exclusive file access in multi-process Python environments can experience lock bypass, leading to data corruption, inconsistent state, or unauthorized resource access; the library is widely used via tox and other packaging tools.

How an attack unfolds

An attacker with the same account privileges locates an active SoftFileLock marker, overwrites the stored PID with a forged value, removes the marker file, and then claims the lock; the library accepts the forged marker and grants access to the new holder.

How to fix it

Upgrade filelock to version 4.2.1 or later; rebuild and redeploy any affected Python environments or containers that depend on the library.

How to confirm the fix worked

Verify installed filelock version is 4.2.1 or higher via package metadata; run integration tests that exercise concurrent SoftFileLock acquisition from separate processes.

Typical attack path

  1. Locate active SoftFileLock marker file created by target process
  2. Modify the PID value inside the marker
  3. Delete the marker file
  4. Acquire the lock as the new holder

How to detect it

Monitor for unexpected modifications or deletions of SoftFileLock marker files containing process identifiers; inspect application logs for lock acquisition events that occur without corresponding process creation.

What your security team should do

  • Upgrade filelock to 4.2.1 or newer across all environments
  • Audit Python dependencies for filelock usage and pin to fixed release
  • Review application code that relies on file-based locking for additional hardening

The record

filelock is a platform-independent file lock for Python. From 3.22.0 until 4.2.1, SoftFileLock can trust a forged process identifier in a marker that an attacker can modify but cannot remove, allowing an authorized contender such as another process of the holder's account or root to act as a confused deputy, remove the live marker, and admit another holder. This issue is fixed in version 4.2.1.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities