Vulnerability DatabaseCVE-2026-144350

CVE-2026-144350: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-144350 is a race condition vulnerability in the filelock Python library's SoftFileLock implementation that can allow two processes to simultaneously enter the same critical section. On POSIX filesystems with atomic name exchange, the recovery logic in SoftFileLock can misidentify an active recovery record as abandoned when PID reuse occurs, enabling a race between competing recovery attempts. The vulnerability affects filelock versions 4.2.1 through 4.2.12 (inclusive) and is fixed in version 4.3.0. It carries a CVSS v3.1 base score of 3.6 (Low) (GitHub Advisory).

Technical details

The root cause is classified as CWE-345 (Insufficient Verification of Data Authenticity). The _stranded_candidates method in _soft.py scanned for .break..<pid>.* marker files and treated any marker associated with a stale start token as abandoned — without verifying whether the PID in the break name currently belongs to a live process performing an active recovery. Because POSIX systems reuse PIDs, a stale marker could name a recycled PID whose current process is still in the middle of restoring a live holder's marker. A local attacker with write access to the shared sticky lock directory (e.g., /tmp) could plant markers to trigger this misidentification, causing the recovery sweep to move an active breaker's file and leave the lock path available to a second contender. The fix in PR #974 adds a liveness check: before claiming a break name, the recovery scan now verifies whether a process with that PID is currently running, and if so, waits rather than proceeding (GitHub PR #974, Fix Commit).

Impact

Successful exploitation can break mutual exclusion guarantees enforced by SoftFileLock, allowing two processes to concurrently hold what should be an exclusive lock and simultaneously execute code within the same critical section. This can lead to data corruption, inconsistent application state, or partial availability loss in applications that rely on filelock for coordinating access to shared resources. Confidentiality is not directly impacted, but integrity and availability are both rated Low given the limited and local scope of the attack (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported. The vulnerability was discovered and reported by an automated OSS Scanner (ANT-2026-01PM0HYF) rather than through active exploitation. Exploitation requires low-privileged local access and high attack complexity due to the need to win a race condition involving PID reuse and concurrent recovery operations. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify target: Confirm the target system uses filelock versions 4.2.1–4.2.12 on a POSIX filesystem with atomic name exchange support (e.g., Linux with renameat2 RENAME_EXCHANGE), and that the lock directory is a shared sticky directory (e.g., /tmp).
  2. Obtain local access: Gain low-privileged local access to the system (e.g., a shell account or unprivileged process).
  3. Monitor lock directory: Watch the shared sticky lock directory for .break..<pid>.* marker files created during SoftFileLock recovery operations.
  4. Trigger PID reuse: Arrange for a process to crash mid-recovery (leaving a stale break marker), then cause the OS to reuse that PID for a new process — this can be facilitated by rapidly spawning and terminating processes.
  5. Plant a marker: As the local attacker, create a marker file in the sticky lock directory that mimics a stale break record referencing the recycled PID, before the legitimate recovery sweep runs.
  6. Race the recovery: Time the marker creation so that the _stranded_candidates sweep encounters the planted marker while the recycled PID's process is actively recovering a live holder's marker, causing the sweep to incorrectly claim and move the live breaker's file.
  7. Achieve dual lock hold: With the lock path now vacated by the erroneous recovery, a second contender acquires the lock simultaneously with the original holder, breaking mutual exclusion (GitHub PR #974, GitHub Advisory).

Indicators of compromise

  • File System: Unexpected .break..<pid>.* or .restore..<pid>.* marker files appearing in shared sticky lock directories (e.g., /tmp) created by processes not associated with the legitimate application.
  • File System: Lock files whose contents reflect a holder that does not match the process currently believed to hold the lock, or lock files that appear transiently empty during active use.
  • Process: Multiple application processes simultaneously executing code that should be mutually exclusive, observable via process monitoring or application-level logging of critical section entry.
  • Logs: Application logs showing concurrent access conflicts, data corruption errors, or unexpected state inconsistencies in components protected by SoftFileLock (GitHub PR #974).

Mitigation and workarounds

Upgrade filelock to version 4.3.0 or later, which contains the fix introduced in PR #974 and commit 13dae4c. As a temporary workaround, restrict the lock directory so that only trusted participants can write to it — this prevents untrusted local accounts from planting markers that trigger the race condition. On systems where upgrading immediately is not possible, avoid placing SoftFileLock files in world-writable sticky directories such as /tmp (GitHub Advisory, Release 4.3.0).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Ubuntu

Unknown

bionic (esm-apps)

python-filelock

Unknown

devel

python-filelock

Unknown

focal (esm-apps)

python-filelock

Unknown

jammy

python-filelock

Unknown

jammy (esm-apps)

python-filelock

Unknown

noble

python-filelock

Unknown

noble (esm-apps)

python-filelock

Unknown

resolute

python-filelock

Unknown

RHEL / CentOS

Affected

OpenShift

Not Affected

Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-143791HIGH7.5
  • Python logoPython
  • pydantic-ai-harness
NoYesDec 04, 2026
CVE-2026-143790LOW3.7
  • Python logoPython
  • pydantic-ai
NoYesDec 04, 2026
CVE-2026-136643NONEN/A
  • Python logoPython
  • pydantic-evals
NoYesDec 04, 2026
CVE-2026-136640NONEN/A
  • Python logoPython
  • pydantic-ai-harness
NoYesDec 04, 2026
CVE-2026-136639NONEN/A
  • Python logoPython
  • pydantic-ai-harness
NoYesDec 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management