CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-144382

CVE-2026-144382: Unverified Ownership and Lock Bypass via Linux Overflow UID in Python filelock

Alon Barad
Alon Barad
Software Engineer

Dec 5, 2026·12 min read·3 visits

Executive Summary (TL;DR)

Prior to version 4.3.0, the Python filelock library trusts file ownership matches on the Linux kernel overflow UID (65534) inside sticky directories like /tmp. Unrelated accounts across user namespaces or idmapped mounts can pre-create lock protocol directories that victim processes treat as their own, allowing attackers to bypass mutual exclusion and admit readers while a writer holds the lock.

CVE-2026-144382 (GHSA-7mx6-8qvh-pvc4) is an unverified ownership vulnerability (CWE-283) in the tox-dev/filelock Python library prior to version 4.3.0. On Linux systems utilizing user namespaces or idmapped mounts, unmapped user identifiers are reported by the kernel as the overflow UID (typically 65534). When lock coordination directories or files reside within a shared sticky directory such as /tmp, filelock's ownership verification fails to distinguish between unrelated host accounts that resolve to the same overflow UID. This allows a local attacker to plant a lock protocol tree that is trusted by victim processes, breaking mutual exclusion guarantees in SoftReadWriteLock, StrictSoftFileLock, and UnixFileLock.

Vulnerability Overview

The filelock package (tox-dev/filelock) provides a platform-independent file-locking mechanism for Python applications. It is widely deployed across Python tooling, package managers, and multi-process orchestration systems to enforce mutual exclusion on shared filesystem resources. To accommodate diverse operating environments and lock semantics, filelock implements several locking backends, including UnixFileLock, StrictSoftFileLock, and SoftReadWriteLock.

When multiple processes coordinate locks inside world-writable directories with the sticky bit set (stat.S_ISVTX, such as /tmp with mode 01777), the library must defend against local denial-of-service, symlink hijacking, and lock spoofing. In a sticky directory, any local user can create new files or subdirectories, and the directory owner or file creator retains control over the directory entry name. To prevent an untrusted local account from planting a pre-existing lock file or protocol coordination tree (<lock_path>.rw or <lock_path>.filelock), filelock performs an ownership verification check via the internal helper function foreign_owner() in src/filelock/_util.py.

Tracked as CVE-2026-144382 (and GHSA-7mx6-8qvh-pvc4), a flaw classified under CWE-283 (Unverified Ownership) exists in filelock versions prior to 4.3.0. The ownership verification routine compares the st_uid obtained from lstat() or fstat() against the current process effective UID (os.geteuid()) and the parent directory UID (parent.st_uid). However, this check fails to account for the semantics of the Linux kernel overflow UID (/proc/sys/kernel/overflowuid, defaulting to 65534) inside Linux user namespaces (user_namespaces(7)) and idmapped mounts.

Because the Linux kernel maps all unmapped user identities from the host or external namespaces to the single fallback overflow UID, stat equality on UID 65534 does not establish a unique owner identity. When a user namespace shares a sticky directory like /tmp with the host or another container, an attacker whose account maps to the overflow UID can plant a malicious protocol directory tree. A victim process executing under an unmapped account—or comparing against an unmapped parent directory owner—observes a matching UID of 65534, treats the attacker's protocol tree as trusted, and violates mutual exclusion invariants.

Root Cause Analysis

To understand the root cause of CVE-2026-144382, it is necessary to examine how the Linux kernel translates user identifiers across namespace boundaries and idmapped filesystems. When a process runs inside a Linux user namespace created with CLONE_NEWUSER, its UID mapping table (/proc/<pid>/uid_map) defines which host UIDs correspond to valid UIDs inside the namespace. If the process inspects a file on a shared filesystem whose underlying host UID is not mapped into the current user namespace, the kernel VFS layer cannot represent the true UID. Instead, the kernel substitutes the system-configured overflow UID, readable at /proc/sys/kernel/overflowuid (almost universally configured as 65534, associated with the nobody account). The same translation applies to idmapped mounts when a filesystem UID lacks a valid mapping in the mount's ID map.

In filelock, lock implementations that rely on directory hierarchies or file creation in shared directories must ensure that the filesystem nodes they interact with were created by the locking account itself or by the trusted owner of the parent directory. Specifically, SoftReadWriteLock maintains a protocol directory tree containing reader and writer state subdirectories, while StrictSoftFileLock and UnixFileLock inspect the lock file node directly. Before trusting an existing filesystem object under a sticky parent directory (parent.st_mode & stat.S_ISVTX), filelock invokes foreign_owner(node, parent).

In versions prior to 4.3.0, foreign_owner() evaluated the expression node.st_uid in {os.geteuid(), parent.st_uid}. If this condition evaluated to True, the function returned None, signaling to the caller that the node was owned by a trusted entity. The fundamental mistake in this logic is the implicit assumption that a numeric UID returned by stat(2) uniquely identifies a single security principal.

When two distinct, unrelated host accounts both lack mappings in a target user namespace—or when a containerized process itself runs under an unmapped identity or nobody (65534)—all files created by these disparate principals report st_uid == 65534. Consequently, the equality check node.st_uid in {os.geteuid(), parent.st_uid} succeeds even though the file or directory is controlled by an untrusted third-party account. Because the real owner of a node reporting the overflow UID cannot be determined from stat metadata alone, treating 65534 as a valid proof of identity under a sticky directory allows cross-account protocol spoofing.

Code Analysis

The vulnerability resides in src/filelock/_util.py within the foreign_owner() function. Prior to version 4.3.0, the implementation checked only the platform, the sticky bit (stat.S_ISVTX) on the parent directory, and direct integer membership of node.st_uid in {os.geteuid(), parent.st_uid}:

# Vulnerable implementation in src/filelock/_util.py (prior to 4.3.0)
def foreign_owner(node: os.stat_result, parent: os.stat_result) -> int | None:
    # :param node: lstat or fstat of the file or directory found in place.
    # :param parent: stat of the directory that holds it.
    # :returns: the owning uid when another account controls the node, otherwise None.
    if sys.platform != "win32" and parent.st_mode & stat.S_ISVTX:
        # FLAW: Does not verify whether node.st_uid is the ambiguous Linux overflow UID (65534).
        # Multiple unmapped host accounts resolve to this identical UID.
        return None if node.st_uid in {os.geteuid(), parent.st_uid} else node.st_uid
    return None

In commit 54e61ea35b50a067274d6a04300dad86b341cc5a (Pull Request #977), the maintainers resolved the flaw by introducing a dedicated helper function, _ambiguous_owner(uid: int) -> bool, and integrating it into foreign_owner():

# Patched implementation in src/filelock/_util.py (version 4.3.0)
def foreign_owner(node: os.stat_result, parent: os.stat_result) -> int | None:
    # :param node: ``lstat`` or ``fstat`` of the file or directory found in place.
    # :param parent: ``stat`` of the directory that holds it.
    #
    # Unmapped accounts in a Linux user namespace or idmapped mount share one reported uid.
    #
    # :returns: the owning uid when another account controls the node, otherwise ``None``.
    if sys.platform != "win32" and parent.st_mode & stat.S_ISVTX:  # pragma: needs foreign-sticky-tmp
        owner = node.st_uid
        # FIX: Reject ownership match if the reported UID is an ambiguous overflow UID.
        return None if owner in {os.geteuid(), parent.st_uid} and not _ambiguous_owner(owner) else owner
    return None
 
 
def _ambiguous_owner(uid: int) -> bool:  # pragma: win32 no cover  # pragma: darwin no cover
    if sys.platform not in {"linux", "android"}:  # pragma: linux no cover  # pragma: android no cover
        return False
    try:
        # Read the kernel's configured overflow UID dynamically.
        return uid == int(Path("/proc/sys/kernel/overflowuid").read_text(encoding="ascii"))
    except (OSError, ValueError):
        # Fail-closed: Without the configured overflow UID, equality from stat cannot prove ownership.
        return True

The patch addresses the vulnerability through three specific mechanisms. First, _ambiguous_owner() restricts the check to linux and android kernels where user_namespaces(7) and /proc/sys/kernel/overflowuid exist. Second, rather than hardcoding 65534, it dynamically reads /proc/sys/kernel/overflowuid to respect custom sysctl configurations. Third, the exception handler implements a strict fail-closed design: if /proc is unmounted, restricted by sandbox policies, or returns unparseable data (raising OSError or ValueError), _ambiguous_owner() returns True.

When _ambiguous_owner(owner) returns True, foreign_owner() returns the integer owner UID instead of None. The calling lock classes (UnixFileLock, StrictSoftFileLock, and SoftReadWriteLock) treat any non-None return value from foreign_owner() as an untrusted foreign node and immediately raise a PermissionError, RuntimeError, or SoftFileLockProtocolError rather than operating on the node.

> [!NOTE] > Fix Completeness Assessment: The patch is complete with respect to UID ambiguity under sticky directories. However, as noted in the updated docs/concepts.rst, a legitimate process that actually runs as the nobody / overflow UID (65534)—or inside a minimal container where /proc/sys/kernel/overflowuid is inaccessible—will now have its own lock nodes rejected if placed inside a shared sticky directory like /tmp. To operate cleanly in such environments, applications must use a private, non-sticky lock directory.

Exploitation

Exploiting CVE-2026-144382 requires local access to a multi-tenant Linux environment, containerized host, or workload using idmapped mounts where a sticky directory (such as /tmp) is bind-mounted or otherwise shared across namespace boundaries. No network vector exists, and the attacker must be able to create files or directories in the shared sticky directory that appear with the kernel overflow UID inside the target process's namespace.

The most direct exploitation target is SoftReadWriteLock, which coordinates concurrent shared readers and exclusive writers using a directory tree on the filesystem. When a process initializes SoftReadWriteLock("/tmp/shared.lock"), the lock protocol manages state inside a coordination directory hierarchy named after the lock path. Under normal operation, if a writer holds an exclusive lock, subsequent reader requests block until the writer releases the lock.

To execute the attack, the adversary performs the following sequence:

  1. Environment Preparation: The target application runs inside a Linux user namespace where unmapped host accounts—or the target process's own account or parent directory owner—resolve to /proc/sys/kernel/overflowuid (65534). The application configures its lock path inside a shared sticky directory, such as /tmp/dataset.lock.
  2. Planting the Protocol Tree: Operating from an unrelated host account that is unmapped in the victim's user namespace (and thus reports st_uid == 65534 to the victim), the attacker pre-creates the lock protocol directory tree in /tmp prior to or during lock contention.
  3. Bypassing foreign_owner(): When the victim process calls acquire_write() or acquire_read() on SoftReadWriteLock, the library inspects the existing protocol directory in /tmp using lstat(). It passes the stat result to foreign_owner(node, parent). Because node.st_uid is 65534 and matches either os.geteuid() or parent.st_uid, foreign_owner() returns None.
  4. Protocol State Manipulation: Because the attacker owns the top-level protocol directory under the sticky /tmp mount, the attacker controls every directory entry inside that protocol tree. While a legitimate victim writer holds the lock on one branch of the tree, the attacker can unlink, rename, or populate the internal reader/writer coordination nodes. When a second victim process requests a read lock, SoftReadWriteLock traverses the attacker-controlled tree, fails to detect the active writer, and admits the reader concurrently.

In addition to breaking read/write exclusion in SoftReadWriteLock, an attacker who controls the planted directory or lock file under StrictSoftFileLock or UnixFileLock can split lock contenders across separate inode trees by unlinking and replacing nodes mid-contention, neutralizing mutual exclusion between cooperating victim processes.

Impact Assessment

The security impact of CVE-2026-144382 is a local integrity and availability violation of application-level file locking primitives. The vulnerability carries a CVSS v3.1 base score of 3.6 (Low) with the vector CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L. The Attack Vector is Local (AV:L) and requires Low Privileges (PR:L), representing any local user or container capable of writing to the shared sticky directory. Attack Complexity is rated High (AC:H) because successful exploitation depends on a specific deployment topology: Linux user namespaces or idmapped mounts sharing a sticky lock directory where unmapped UIDs collapse to overflowuid.

When these environmental preconditions are met, the complete breakdown of mutual exclusion directly compromises data integrity (I:L) and service availability (A:L). Applications rely on filelock—and specifically SoftReadWriteLock—to serialize concurrent read and write access to shared state, such as local SQLite databases, configuration files, package caches (e.g., virtualenv, tox, or pip caches), and inter-process state files.

If a reader is admitted while a writer actively modifies the underlying resource, the reader consumes partially written or inconsistent state, leading to application crashes, silent data corruption, or logic errors. Conversely, if two writers are split across disjoint lock trees planted by the attacker, concurrent writes will overwrite each other, corrupting the protected file.

From a threat intelligence perspective, CVE-2026-144382 exhibits an EPSS score of 0.00187 (0.19%), placing it in the 8.69th percentile of scored vulnerabilities. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, and no active exploitation in the wild has been reported. The low EPSS score reflects the local nature of the bug and the architectural specificity required to trigger it.

Remediation

The primary remediation for CVE-2026-144382 is to upgrade the filelock package to version 4.3.0 or later. Version 4.3.0 incorporates commit 54e61ea35b50a067274d6a04300dad86b341cc5a, which refuses any lock file or protocol directory under a sticky parent when its reported UID matches /proc/sys/kernel/overflowuid (or when the overflow UID cannot be read from /proc).

pip install --upgrade "filelock>=4.3.0"

In environments where immediate package upgrades are not feasible—or where legitimate processes execute under the nobody / overflow UID (65534) inside restricted containers—operators should implement architectural lock directory isolation. The vulnerability only triggers when lock files are placed inside a shared directory with the sticky bit set (stat.S_ISVTX, such as /tmp or /var/tmp).

import os
from pathlib import Path
from filelock import SoftReadWriteLock
 
# Insecure pattern in multi-namespace environments:
# lock = SoftReadWriteLock("/tmp/shared_app.lock")
 
# Secure pattern: Use a dedicated, non-sticky private directory owned by the locking account
runtime_dir = Path(os.environ.get("XDG_RUNTIME_DIR", f"/run/user/{os.geteuid()}"))
lock_dir = runtime_dir / "app_locks"
lock_dir.mkdir(mode=0o700, parents=True, exist_ok=True)
 
lock = SoftReadWriteLock(str(lock_dir / "shared_app.lock"))

By configuring the application to place locks inside a private directory owned exclusively by the authorized user or group (with permissions 0700 or 0750 and without S_ISVTX), untrusted accounts cannot pre-create files in the directory. Furthermore, because foreign_owner() only enforces the overflow UID refusal when parent.st_mode & stat.S_ISVTX is non-zero, using a private non-sticky directory also prevents false-positive PermissionError or SoftFileLockProtocolError exceptions for containerized workloads that legitimately run as UID 65534 or lack /proc access.

Official Patches

tox-devGitHub Security Advisory GHSA-7mx6-8qvh-pvc4
tox-devPull Request #977 fixing overflow UID ownership verification
tox-devfilelock 4.3.0 Release Notes

Fix Analysis (1)

Technical Appendix

CVSS Score
3.6/ 10
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
EPSS Probability
0.19%
Top 91% most exploited

Affected Systems

tox-dev/filelock (PyPI package: filelock) on Linux and Android platforms

Affected Versions Detail

Product
Affected Versions
Fixed Version
filelock
tox-dev
< 4.3.04.3.0
AttributeDetail
CVE / GHSA IDCVE-2026-144382 / GHSA-7mx6-8qvh-pvc4
Weakness ClassCWE-283: Unverified Ownership
CVSS v3.1 Score3.6 Low (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L)
EPSS Score0.19% (8.69th Percentile)
Affected Componentfilelock._util.foreign_owner (SoftReadWriteLock, StrictSoftFileLock, UnixFileLock)
Patched Versionfilelock 4.3.0 (Commit 54e61ea35b50a067274d6a04300dad86b341cc5a)
Exploit & KEV StatusNo public PoC / Not in CISA KEV

MITRE ATT&CK Mapping

T1078.003Valid Accounts: Local Accounts
Defense Evasion
T1222.002File and Directory Permissions Modification: Linux and Mac File and Directory Permissions Modification
Defense Evasion
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-283
Unverified Ownership

The product does not properly verify that a critical resource is owned by the expected entity, failing to account for ambiguous ownership states such as the Linux kernel overflow UID across user namespaces.

Vulnerability Timeline

CVE-2026-144382 reserved by GitHub CNA and published alongside GHSA-7mx6-8qvh-pvc4.
2026-12-03
Fix commit 54e61ea35b50a067274d6a04300dad86b341cc5a merged via Pull Request #977 and filelock 4.3.0 released.
2026-12-03
Official vulnerability record published in the National Vulnerability Database (NVD).
2026-12-03
NVD record updated with CVSS v3.1 score (3.6) and CWE-283 classification; FIRST EPSS score initialized at 0.00187.
2026-12-04

References & Sources

  • [1]GitHub Security Advisory: GHSA-7mx6-8qvh-pvc4
  • [2]GitHub Pull Request #977: Refuse overflow UID under sticky directory
  • [3]filelock 4.3.0 Release Tag
  • [4]NVD Vulnerability Detail: CVE-2026-144382
  • [5]CVE.org Record: CVE-2026-144382
  • [6]CVEListV5 Official JSON Record for CVE-2026-144382
  • [7]Shodan CVEDB Entry: CVE-2026-144382

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•19 minutes ago•CVE-2026-144381
3.6

CVE-2026-144381: Unintended Directory Permission Modification in Python filelock StrictSoftFileLock

CVE-2026-144381 (GHSA-gqj6-5294-r46r) is a local permission assignment and directory validation vulnerability in the Python filelock library prior to version 4.3.0. In Unix-like environments where a shared parent directory is writable by multiple users and lacks the sticky bit, an unprivileged local user can rename an unrelated directory owned by a victim account to match the filelock coordination path (<path>.filelock). When the victim process subsequently invokes StrictSoftFileLock, the library verifies ownership of the directory via os.geteuid() and executes os.fchmod() to restrict its permissions without first validating that the directory contents conform to the lock protocol. This modifies the permission bits of the victim's directory and injects a claims subdirectory, resulting in unauthorized permission modifications and local denial of service.

Alon Barad
Alon Barad
1 views•11 min read
•about 2 hours ago•CVE-2026-144341
2.5

CVE-2026-144341: Windows Oplock Asynchronous Cancellation Delay in Python filelock

CVE-2026-144341 (GHSA-x9cq-qqfm-8972) is a local denial-of-service vulnerability affecting the Python filelock library prior to version 4.3.0 on Microsoft Windows systems. A local user account with read access to a SQLite lock database file can place a Windows Opportunistic Lock (oplock) on the database, forcing the low-level file open routine into an uninterruptible synchronous polling loop. Because AsyncReadWriteLock executes SQLite database operations inside a background worker thread via asyncio executor dispatch, task cancellations and process shutdown routines cannot interrupt the oplock wait loop, delaying coroutine termination up to the full lock acquisition timeout.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 3 hours ago•CVE-2026-144334
4.7

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

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.

Alon Barad
Alon Barad
4 views•11 min read
•about 4 hours ago•CVE-2026-144338
3.3

CVE-2026-144338: Unbounded Directory Enumeration Denial of Service in Python filelock ReadWriteLock

CVE-2026-144338 is a local denial-of-service vulnerability affecting the Python filelock library prior to version 4.3.0. On POSIX systems, when ReadWriteLock or AsyncReadWriteLock operates within a shared parent directory, an unprivileged local user can flood the directory with entries matching the .filelock-* prefix. Because connection initialization executes an unbounded synchronous directory sweep before evaluating user-supplied lock timeouts, this flooding stalls calling threads and starves the asyncio event loop.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 5 hours ago•CVE-2026-144342
2.5

CVE-2026-144342: Windows Opportunistic Lock Denial of Service in Python filelock StrictSoftFileLock

CVE-2026-144342 (GHSA-jcqr-c9r9-vgjh) is an uncontrolled resource consumption vulnerability in the Python filelock package affecting Windows environments. When applications utilize the StrictSoftFileLock locking protocol in directories shared across multiple local accounts, a low-privileged user with read-only access can exploit Windows NTFS opportunistic locking (oplock) semantics on aged, abandoned private claim records. By holding an unacknowledged read oplock on a stale temporary file, an attacker forces subsequent lock claimants attempting to unlink the record during directory reclamation scans into an indefinite kernel-level I/O wait, bypassing configured acquisition timeout limits.

Alon Barad
Alon Barad
3 views•10 min read
•about 6 hours ago•CVE-2026-145370
7.7

CVE-2026-145370: Control-Plane Denial of Service via Unbounded JWKS Fetch in Istio

CVE-2026-145370 (GHSA-7vw6-2xxx-fch6) is a resource allocation vulnerability in the Istio control plane (istiod). Prior to versions 1.30.9, 1.31.5, and 1.32.1, the JWKS resolver routine getRemoteContentWithRetry used an unbounded io.ReadAll call to retrieve remote JWKS and OpenID discovery documents. An authenticated Kubernetes user with permissions to create or modify a RequestAuthentication custom resource can specify an endpoint that returns an arbitrarily large or infinite stream, exhausting control-plane memory and placing istiod into a persistent CrashLoopBackOff state.

Alon Barad
Alon Barad
4 views•9 min read