Live › vulnerability › CVE-2026-112910
Go to dashboardOn Windows, filelock ignores the mode argument, so a lock file or ReadWriteLock database created with mode=0o600 gets the parent directory's inherited permissions. Other local accounts that can read or write that directory can open the file, hold the byte-range lock to block the owner, or read holder metadata.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-28 21:12 UTC. All times on this page are UTC.
Only Windows hosts running filelock 3.10.0 through 4.2.0 where callers rely on mode=0o600 for privacy across local accounts. The exposure requires the lock directory to hand down read or modify access to other accounts; Unix systems are not affected.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| filelock | pypi | >= 3.10.0, <= 4.2.0 | 4.2.1 |
pip show filelock on Windows hosts and check whether the version is between 3.10.0 and 4.2.0.FileLock( or ReadWriteLock( calls that pass mode=0o600, and check whether their lock directory grants other local accounts access to new files (inheritable ACL entries, (OI)(CI)).filelock to 4.2.1.Each row is the first time that source carried this signal. The analyst’s rows are its own findings.
filelock on Windows ignores the mode argument. FileLock(path, mode=0o600) creates the same file as FileLock(path): one with no security descriptor of its own (the Windows record that says who may access a file). Its access list, or ACL, is whatever the lock directory hands down to new files. filelock creates the ReadWriteLock database, which it asks to be 0o600, the same way. In a directory whose inheritable ACL grants other local accounts access to new files, those accounts can open the lock file or database. They can take the byte-range lock (a lock on a span of bytes in a file) once the owner releases it and keep the owner's later acquire() calls waiting or timing out. They can read holder metadata an on_acquired hook left in a preserve_lock_file=True file. Where the directory hands down modify access, they can write to both files.
lock.mode still reports 0o600. The documentation neither promises an ACL on Windows nor says that Windows drops the mode. On Unix the same mode keeps other accounts out. Mutual exclusion between processes that follow the protocol holds on either platform. Affected versions are filelock 3.10.0 through 4.2.0 on Windows.
Anthropic's OSS Scanner reported this in private. Finding covered by this advisory:
ANT-2026-0KEO0DDO [medium, CWE-732]: WindowsFileLock ignores mode; 0o600 lock files inherit the directory ACL.CVSS 3.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L scores 5.3 (Medium).
AV:L (local): the other account needs a logon on the same host. PR:L (low privileges): an ordinary account is enough. UI:N (no user interaction). AC:L (low attack complexity): no race. C:L (partial confidentiality impact): the lock file (holder metadata) and the lock database are readable where 0o600 was meant to keep them private. I:L (partial integrity impact): in the directory layout the maintainers tested, the other account can also write both files, which lets it corrupt the lock's own state but nothing the lock protects. A:L (partial availability impact): the other account can hold the byte-range lock and make the owner wait or time out. S:U (scope unchanged).
Classification from the review: Windows permission failure with security impact only where callers rely on mode=0o600 across accounts. The review had marked it an unconfirmed Windows claim, since the scanner traced stand-in Win32 calls on Linux. The maintainers have since confirmed it on Windows with two local accounts (see Evidence). The scanner rated this medium; the maintainers keep medium.
FileLock and AsyncFileLock on Windows (WindowsFileLock), and the SQLite database of ReadWriteLock and AsyncReadWriteLock. Both go through _open_non_reparse_fd. The soft locks create their markers with os.open, which also keeps only a read-only bit of the mode on Windows; the scanner did not examine them further.Users, or any directory with (OI)(CI) entries (entries that new files and sub-directories inherit) for another account. A directory whose ACL already excludes other accounts, such as one inside a user profile, hides the problem.LockFileEx documentation, read access is enough to take the byte-range lock, so it can hold the lock whenever the owner does not. The lock file exists while the owner holds the lock, and stays after release with preserve_lock_file=True. The ReadWriteLock database is not unlinked at any point.UnixFileLock creates the file with the mode and repeats it with . Mutual exclusion between cooperating processes is not affected.Scanned commit b831496b0273: _open_non_reparse_fd reduces the mode to one read_only bit. That bit is false for every accepted mode, because _check_mode rejects any mode without owner read and write, and an unset mode becomes 0o666. In _nt_open the OBJECT_ATTRIBUTES.SecurityDescriptor field stays unassigned, and read_only only chooses FILE_ATTRIBUTE_READONLY. _open_lock_database passes 0o600 through the same function on Windows.
d0061e4 "added multiuser support and associated tests" (#192, 2023-03-15), first tag 3.10.0 (verified), added the mode parameter and on Windows handed it to os.open, which applies only the read-only attribute. The Windows backend has applied no more of the mode than that at any version, so this is a long-standing gap rather than a regression.
_open_non_reparse_fd(path, mode) computes read_only = not mode & _OWNER_WRITE and calls _nt_open(path, read_only=read_only). _nt_open fills an OBJECT_ATTRIBUTES with the NT path and OBJ_CASE_INSENSITIVE and leaves SecurityDescriptor NULL. It then calls NtCreateFile with FILE_OPEN_IF and FILE_ATTRIBUTE_NORMAL (or FILE_ATTRIBUTE_READONLY when read_only, which no accepted mode produces). Nothing consults the group and other bits. Per the NtCreateFile and OBJECT_ATTRIBUTES documentation, a NULL descriptor gives the new file default security, which on NTFS is the set of inheritable entries of the parent directory. A lock file created with mode=0o600 in a directory that hands down read access to Users is therefore readable by Users.
Nothing tells the caller. The constructor validates the mode, lock.mode returns 0o600, and has_explicit_mode is True. docs/concepts.rst says "filelock creates the file with it" and that "0o600 and 0o700 keep other UIDs out", with no Windows caveat. Only the _open_non_reparse_fd docstring and a comment in _soft.py record the limitation.
The scanner's reproducer for ANT-2026-0KEO0DDO, quoted as received. It ran against commit b831496b0273.
repro
#!/usr/bin/env python3
import os
import shutil
import subprocess
import sys
import tempfile
private_job = "/tmp/repro.d/job_with_private_lock.py" # with FileLock(path, mode=0o600)
default_job = "/tmp/repro.d/job_with_default_lock.py" # with FileLock(path)
on_windows_backend = "/tmp/repro.d/run_on_windows_backend.py" # prints every Win32 call filelock makes
os.umask(0o022)
locks = tempfile.mkdtemp()
# control: UnixFileLock, which leaves the lock file behind
subprocess.run([sys.executable, private_job, f"{locks}/private.lock"], check=True)
subprocess.run([sys.executable, default_job, f"{locks}/default.lock"], check=True)
unix_private_mode = os.stat(f"{locks}/private.lock").st_mode & 0o777
unix_default_mode = os.stat(f"{locks}/default.lock").st_mode & 0o777
# trigger: the same two programs on WindowsFileLock, same lock name so the call lists can be compared whole
windows_private = [sys.executable, on_windows_backend, private_job, f"{locks}/job.lock"]
windows_default = [sys.executable, on_windows_backend, default_job, f"{locks}/job.lock"]
windows_private_calls = subprocess.run(windows_private, check=True, capture_output=True, text=True).stdout.splitlines()
windows_default_calls = subprocess.run(windows_default, check=True, capture_output=True, text=True).stdout.splitlines()
shutil.rmtree
This page as .md · .json · in your agent: get_signal("CVE-2026-112910")
GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.
fchmod