Vulnerability DatabaseCVE-2026-112908

CVE-2026-112908: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-112908 is a local privilege-based lock bypass vulnerability in the filelock Python library affecting StrictSoftFileLock and AsyncStrictSoftFileLock on POSIX systems. The flaw exists in versions >= 3.30.0 and <= 4.2.0, where claim directories are created without applying the caller's restrictive lock mode, potentially leaving them world-writable. A local attacker with write access to these directories can delete an active holder's claim files, allowing a second process to acquire the lock while the original holder remains in its critical section. It was reported on October 15, 2026, by Anthropic's OSS Scanner (finding ANT-2026-AD6SUOON), disclosed via GitHub Advisory GHSA-6627-m3xw-93mp on October 28, 2026, and carries a CVSS v3.1 base score of 5.3 (Medium) (GitHub Advisory).

Technical details

The root cause is classified as CWE-732 (Incorrect Permission Assignment for Critical Resource) and CWE-279 (Incorrect Execution-Assigned Permissions). In the vulnerable _ensure_protocol_directory function, both the .filelock coordination directory and the .filelock/claims subdirectory are created using a bare mkdir() call without passing the caller's mode argument, resulting in permissions of 0o777 filtered only through the process umask or an inherited default ACL — not the restrictive mode (e.g., 0o600) the caller specified. Because these directories lack the sticky bit, any local user with write access to them can unlink the holder's 0o600 claim files (removing a file requires write permission on the directory, not the file itself). Three environmental conditions trigger this: umask 000 in a sticky directory like /tmp, umask 002 with the attacker in the directory's group, or a default ACL on the lock's parent granting group write. A runnable reproducer demonstrating the bug is included in the advisory (GitHub Advisory, Fix PR #839).

Impact

Successful exploitation breaks mutual exclusion: two processes simultaneously hold the same StrictSoftFileLock, and neither receives any signal or error about the conflict. The original holder continues reporting is_locked == True and releases with exit status 0, unaware its critical section was violated. This creates a high integrity risk for any shared resource protected by the lock (e.g., shared files, databases, or configuration state), as concurrent uncoordinated writes can corrupt data. Additionally, an attacker can plant a malformed claim file (e.g., an empty file named held-v1-<32 zeros>.claim) to cause SoftFileLockProtocolError on all subsequent acquire() calls, resulting in a low-severity denial of service. There is no confidentiality impact, as the 0o600 claim files remain unreadable by other users (GitHub Advisory).

Exploitability

A proof-of-concept reproducer is publicly available in the GitHub Security Advisory, consisting of driver, attacker, and victim helper scripts that demonstrate the lock-bypass bug on a live system. The exploit requires local shell access as an unprivileged account on the same POSIX host, making it a local-only attack (AV:L) with high complexity (AC:H) due to the specific umask or ACL preconditions required. There is no evidence of in-the-wild exploitation at this time, and no threat actor attribution has been reported. The EPSS score is approximately 0.0012 (0.12%), reflecting low probability of automated exploitation. The vulnerability is not listed in the CISA KEV catalog (GitHub Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify a target POSIX system where a victim process uses StrictSoftFileLock or AsyncStrictSoftFileLock from filelock >= 3.30.0 and <= 4.2.0 with a restrictive mode (e.g., mode=0o600). Confirm the lock's parent directory has a permissive umask (000 or 002) or a default ACL granting group write access.
  2. Verify directory permissions: As the attacker account, check whether the .filelock coordination directory and .filelock/claims subdirectory are world-writable (e.g., ls -la <lockpath>.filelock/). Under umask 000, these will appear as drwxrwxrwx (0777) despite the claim files being 0600.
  3. Wait for victim to acquire the lock: Monitor the claims/ directory for the appearance of held-v1-<uuid>.claim and intent-v1-<uuid>.claim files, indicating the victim process has entered its critical section.
  4. Unlink the victim's claim files: As the attacker, execute os.unlink() on each claim file in the claims/ directory (write permission on the directory, not the file, is sufficient): python3 -c "import os, sys; [os.unlink(f'{sys.argv[1]}.filelock/claims/{n}') for n in os.listdir(f'{sys.argv[1]}.filelock/claims')]" <lockpath>
  5. Acquire the lock as a second process: Launch a second process of the victim's account that calls StrictSoftFileLock(<lockpath>).acquire(). With the claims directory now empty, it will scan, find no claims, publish its own, and enter the critical section — while the original holder is still inside.
  6. Optional DoS: Instead of step 5, plant a malformed claim file (e.g., touch <lockpath>.filelock/claims/held-v1-00000000000000000000000000000000.claim) to cause all subsequent acquire() calls to raise SoftFileLockProtocolError until the file is manually removed (GitHub Advisory).

Indicators of compromise

  • File System: Unexpected absence of held-v1-*.claim and intent-v1-*.claim files in <lockpath>.filelock/claims/ while the holder process is still running; presence of malformed claim files (e.g., empty files named held-v1-00000000000000000000000000000000.claim); .filelock and claims/ directories with permissions 0777 owned by the victim user but writable by others.
  • Process: Two or more processes simultaneously holding the same StrictSoftFileLock path, observable via process listings or application-level logging showing concurrent critical section entry; victim process logging leaving, is_locked=True with exit status 0 despite a concurrent holder being present.
  • Logs: Application logs showing SoftFileLockProtocolError: malformed claim record errors on acquire() calls, which may indicate a planted malformed claim; unexpected concurrent writes to files or resources that should be serialized by the lock.

Mitigation and workarounds

Upgrade filelock to version 4.2.1 or later, which fixes this issue by passing the caller's mode to mkdir() for both the .filelock and claims/ directories, and additionally sets the sticky bit on both so only the claim publisher can remove their own claims (filelock 4.2.1 Release, Fix Commit). For systems that cannot immediately upgrade, apply these workarounds: (1) run processes that take strict locks with umask 022 or umask 077; (2) avoid placing default ACLs that grant other accounts write access on the lock's parent directory; (3) keep strict locks in directories other users cannot write; (4) for existing lock paths, manually restrict permissions: find . -maxdepth 1 -type d -name '*.filelock' -exec chmod -R go-w {} +. Note that directories created by vulnerable versions retain their permissive modes even after upgrading, so manual remediation of existing .filelock trees is required (GitHub Advisory).

Community reactions

The vulnerability was reported by Anthropic's automated OSS Scanner on October 15, 2026, and credited to Anthropic in the advisory — part of a broader batch of filelock security issues discovered through automated analysis. The maintainer (gaborbernat) responded rapidly, opening a fix PR (#839) within approximately two hours of receiving the report and publishing the patched release 4.2.1 on October 17, 2026. The NixOS security tracker opened a tracking issue for affected python3Packages.filelock packages shortly after disclosure. No significant broader media coverage or social media discussion has been identified beyond the GitHub advisory and standard vulnerability database entries (GitHub Advisory, Fix PR #839).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

python-filelock

Affected

sid

python-filelock: 4.2.2-1

Fixed

trixie

python-filelock

Affected

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

python-filelock.src

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

GHSA-fmmw-m59r-c4pfHIGH7.3
  • Python logoPython
  • sentry
NoYesNov 24, 2026
GHSA-jh8f-87gj-2mw7MEDIUM6.5
  • Python logoPython
  • webvigil
NoYesNov 24, 2026
GHSA-wfp3-jwpm-7j2xMEDIUM5.3
  • Python logoPython
  • webvigil
NoYesNov 24, 2026
GHSA-hhpx-9q93-mv55MEDIUM4.7
  • Python logoPython
  • webvigil
NoYesNov 24, 2026
GHSA-vjvj-3m3f-fgmmLOWN/A
  • Python logoPython
  • uv
NoNoNov 24, 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