Dev.to Security 🔐 Cybersecurity 👁 2 📖 3 min read

CVE-2026-144334: CVE-2026-144334: Local Denial of Service via Drive-Relative Path Interception in Python filelock on Windows

CVE-2026-144334: Local Denial of Service via Drive-Relative Path Interception in Python filelock on Windows Vulnerability ID: CVE-2026-144334 CVSS Score: 4.7 Published: 2026-12-04 CVE-2026-144334 is a local denial-o

CVE-2026-144334: Local Denial of Service via Drive-Relative Path Interception in Python filelock on Windows

Vulnerability ID: CVE-2026-144334
CVSS Score: 4.7
Published: 2026-12-04

CVE-2026-144334 is a local denial-of-service vulnerability affecting the Python filelock package prior to version 4.3.0 on Microsoft Windows systems. The host_name() function unconditionally probes the POSIX path /proc/self/ns/pid to retrieve the Linux PID namespace inode. On Windows, a path beginning with a single leading slash resolves relative to the root of the current working drive (e.g., C:\proc\self\ns\pid). Because default Windows NTFS permissions allow unprivileged local users to create directories at the drive root, a local attacker can plant this file structure to inject an arbitrary NTFS file index into the host identity string recorded by SoftFileLock and MarkerSoftFileLock. If the lock-holding process terminates abnormally and the planted path is subsequently altered, removed, or evaluated from a different working drive, contending processes observe a hostname mismatch and fail closed, permanently blocking stale lock recovery.

TL;DR

In filelock prior to 4.3.0 on Windows, an unconditional probe of /proc/self/ns/pid resolves to the current drive root (such as C:\proc\self\ns\pid). An unprivileged local user can create this path to corrupt the host identity recorded in SoftFileLock and MarkerSoftFileLock marker files, preventing stale lock reclamation after process termination and causing persistent local denial of service.

⚠️ Exploit Status: POC

Technical Details

  • CVE ID: CVE-2026-144334 (GHSA-fmp2-7mgr-gp5h)
  • Weakness Class: CWE-427: Uncontrolled Search Path Element
  • Affected Component: filelock (src/filelock/_identity.py: host_name())
  • Affected Platform: Microsoft Windows (filelock < 4.3.0)
  • CVSS v3.1 Score: 4.7 Medium (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H)
  • EPSS Score: 0.21% (12.13th Percentile)
  • Security Impact: Local Denial of Service via unrecoverable stale SoftFileLock / MarkerSoftFileLock
  • CISA KEV Status: Not Listed

Affected Systems

  • tox-dev/filelock (PyPI: filelock) on Microsoft Windows
  • filelock: < 4.3.0 (Fixed in: 4.3.0)

Code Analysis

Commit: 4f7a3d7

fix(identity): limit PID probe to Linux (#1036)

diff --git a/src/filelock/_identity.py b/src/filelock/_identity.py
index f0b70813e..60070255b 100644
--- a/src/filelock/_identity.py
+++ b/src/filelock/_identity.py
@@ -57,10 +58,11 @@ def host_name() -> str:
-    try:
-        namespace = Path("/proc/self/ns/pid").stat().st_ino
-    except OSError:  # only Linux 3.8+ has the file, and a sandbox may hide it; nothing else tells namespaces apart
-        namespace = _INITIAL_PID_NAMESPACE
+    namespace = _INITIAL_PID_NAMESPACE
+    if sys.platform in {"linux", "android"}:  # pragma: linux cover
+        # Kernels before Linux 3.8 lack this file, and sandboxes can hide it.
+        with suppress(OSError):
+            namespace = Path("/proc/self/ns/pid").stat().st_ino

Mitigation Strategies

  • Upgrade the Python filelock package to version 4.3.0 or later so that the /proc/self/ns/pid probe only executes on Linux and Android platforms.
  • Replace SoftFileLock and MarkerSoftFileLock with the default OS-native FileLock (WindowsFileLock) on Windows environments that do not lock across network shares.
  • Harden NTFS Access Control Lists (ACLs) on the root of local drives (e.g., C:) to prevent unprivileged standard users from creating drive-root directories, or pre-create a restricted, empty C:\proc folder owned by Administrators.
  • Audit and clean up existing lock marker files on Windows systems that contain the '?pidns-' suffix.

Remediation Steps:

  1. Run 'pip install --upgrade "filelock>=4.3.0"' across all Python virtual environments and system installations on Windows.
  2. Inspect all local Windows drive roots for the presence of '\proc\self\ns\pid' using PowerShell: 'Get-ChildItem -Path C:\proc -Recurse -Force -ErrorAction SilentlyContinue'.
  3. Remove any unauthorized '\proc' directory structures from drive roots using 'Remove-Item -Path C:\proc -Recurse -Force'.
  4. Search application lock directories for stale marker files containing '?pidns-' on Windows and remove orphaned lock files before restarting affected services.

References

Read the full report for CVE-2026-144334 on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.