Repository navigation
chore(deps): update dependency filelock to v4.3.0 [security] - #303
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
4.2.10→4.3.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
FileLock on Unix lets two processes hold one lock after another user removes the lock file
CVE-2026-144405 / GHSA-386w-3w6q-9c53
More information
Details
Summary
On Unix,
FileLocklocks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as/tmpthat account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock.oss-security-shopify reported this through private vulnerability reporting as
GHSA-386w-3w6q-9c53, received on 17 November 2026.Affected area
Acquisition of the native Unix lock,
UnixFileLock, whichFileLocknames wherefcntlis available.Attacker-controlled input
Another local account must be able to create the lock file before the victim does, in a sticky directory both can write, and must know or guess the lock path. It does not need access to the resource the lock protects, and it does not need to win a race: it removes the file at any time during a hold.
Affected code
In 4.2.11,
_open_lock_fileopens an existing file when the exclusive create fails, and_finalize_locked_fdrecords the hold after checking only that the file still has a link.Mechanism
0666in a sticky directory.EEXIST, or withEACCESwhere the kernel protects files in sticky directories (fs.protected_regular). Both paths reach_open_existing_lock_file, which opens the attacker's file withoutO_CREAT. #317 added theEACCESpath in 3.13.2.flockon that file._finalize_locked_fdseesst_nlink == 1and records the hold. Nothing comparesst_uidwith the caller's user ID.unlink(2),EPERM). The victim'sflockstays on the unlinked inode.O_CREAT | O_EXCL, takesflockon the new inode and enters the protected section while the first is still in it.Out of scope: a lock file the caller created, which other accounts cannot remove under a sticky directory; a directory without the sticky bit that other accounts can write, where any of them can remove any file (the directory boundary); Windows; the soft locks, which already refuse a coordination directory of another account.
Reproduction and evidence
Run on Linux 7.3.3 (Fedora 45) in a user namespace that maps three user IDs: 1001 as the attacker and 1002 for both victim processes. Each victim holds the lock for 4 seconds and waits at most 2 seconds for it.
Control, 4.2.11, the attacker leaves the file in place. The second process times out:
4.2.11 (commit
554c37b5), the attacker removes the file 1.5 seconds into the first hold. Both processes are inside from 10:47:01 to 10:47:04:3.13.1, the release before #317, refuses the file, so the first process never holds it:
With the fix (commit
4536f7da), the first process is refused:Attack sequence
sequenceDiagram participant A as Attacker (uid 1001) participant P as /tmp/app.lock participant V1 as Victim process 1 participant V2 as Victim process 2 A->>P: create file, mode 0666 V1->>+P: open existing file, flock inode 1 P-->>V1: lock held rect rgb(255, 214, 214) A->>P: unlink (owner under sticky directory) V2->>+P: O_CREAT | O_EXCL creates inode 2, flock P-->>V2: lock held while process 1 still holds inode 1 end deactivate P deactivate P rect rgb(216, 243, 220) V1->>P: fixed: fstat shows another owner P-->>V1: PermissionError, no hold endReproducer files
Written for this advisory; the report's cross-account steps were not run by the reporter. Install the release to test into a directory, then run from the directory holding both files. It needs
unsharewith subordinate user IDs and no root:Pass
controlin place ofunlinkto leave the file in place.holder.pyrun.shImpact
Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here.
Reproducibility: moderate. The steps are deterministic and need no race, but they need a second local account and a lock path in a sticky directory that the attacker creates first.
Real-world exposure: niche. Most applications keep locks in a directory only their own account writes. A lock at a fixed path in
/tmpon a host with other local accounts is the exposed setup, and the documentation named/tmpas a suitable sticky directory.Severity: 2.5 (Low),
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N.AV:L: the attacker needs a local account on the host.AC:H: the attack depends on conditions the attacker does not control. The application must keep its lock at a predictable path in a shared sticky directory, and the attacker must create the file before any victim does.PR:L: an unprivileged account suffices.UI:N: no user action is needed.S:U: the effect stays within the application using the lock.C:N: nothing is disclosed.I:L: the overlap can corrupt what the lock guards, but the attacker does not choose what is written. The evidence does not show more, so the lower value applies.A:N: before this flaw the same attacker could already delay victims by holding the lock.Versions tested
Reproduced on 3.13.2, 3.20.3, 4.0.0 and 4.2.11. Not reproduced on 3.13.1, which raises
PermissionError. Releases between those tested were not run.PR #968 makes
UnixFileLockraisePermissionErrorfor a lock file under a sticky directory that belongs to neither the caller's account nor the directory's owner. The check runs on the opened file once the lock is taken, and it is the ruleStrictSoftFileLockandSoftReadWriteLockalready apply to their coordination directories.Known mitigation
Keep the lock file in a directory that only the accounts using the lock can write. Where the lock has to live in a shared sticky directory, have the directory's owner create the file before any other account can.
Affected release
Credits
oss-security-shopify,
GHSA-386w-3w6q-9c53.Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: ReadWriteLock can overwrite victim-owned files through a directory swap
CVE-2026-144395 / GHSA-22wc-j8c9-7gxg
More information
Details
Impact
On POSIX, another account with rename access in a shared, non-sticky lock directory can redirect a SQLite-backed
ReadWriteLockoperation to a file writable by the locking process. A cross-account overwrite was confirmed on Linux. The affected setup also required a victim-owned directory that the other account could previously read.Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Filelock now creates the final database link inside a fresh owner-only directory, verifies its permissions and requires the link to exist when SQLite opens it. Upgrade every process sharing the database before resuming operations. Until then, keep its parent writable only by the locking account or use a sticky shared parent. Fix in PR #1096.
Credits
OSS Scanner: ANT-2026-XYOWG885.
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Read-handle oplock stalls unrelated async tasks on Windows
CVE-2026-144339 / GHSA-57mc-wxv7-332q
More information
Details
Impact
On Windows, a local account with read access to a native lock file can delay a nonblocking or short-timeout
FileLockacquisition. WithAsyncFileLock(run_in_executor=False), the delay also blocks unrelated tasks on the event loop. The default executor keeps the loop responsive but an acquisition can still miss its own deadline on the affected release.Affected versions and mitigation
Confirmed affected:
= 4.2.12. Upgrade to4.3.0.The acquisition loop now treats an oplock conflict as contention immediately. Nonblocking calls can raise
Timeouteven if the file becomes available shortly afterward. Restrict lock-file read access to trusted accounts and retain the default async executor. Fix in PR #1033Credits
Scan
filelock-20261116-009; findingANT-2026-F0PRXOX0.Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Shared-directory entries delay read-write locks beyond timeout
CVE-2026-144338 / GHSA-5qxg-3g64-7g62
More information
Details
Impact
On POSIX, another account with write access to the parent directory of a SQLite lock database can make
ReadWriteLockinitialization and acquisition run past their requested timeout, even when the lock is free.AsyncReadWriteLockconstructs the same backend on the event-loop thread, so a slow initialization can also delay other tasks.Affected versions and mitigation
Confirmed affected:
= 4.2.12. Upgrade to4.3.0.Dead-holder cleanup now checks a 50 ms budget between directory entries and can resume on a later connection. An individual filesystem operation can exceed that budget, and unvisited links can remain. Keep the database in a directory writable only by trusted accounts. A sticky bit still permits new directory entries. Fix in PR #1096
Credits
November 18, 2026 filelock security review: ANT-2026-W2TXGKZX.
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: SoftFileLock recovery can admit two holders through a foreign-owned record
CVE-2026-144351 / GHSA-69rv-9gxw-r2jh
More information
Details
Impact
During stale-marker recovery,
SoftFileLockcan admit two holders if another account can create entries in a shared sticky lock directory. This requires a POSIX filesystem that supports atomic name exchange. An affected caller can enter a critical section while its peer still holds the lock.Affected versions and fix
Versions 4.2.1 through 4.2.12 are affected. Upgrade to filelock
4.3.0or later. Recovery keeps foreign-owned records away from the public lock path. PR #975Workaround
Keep the lock in a directory writable only by trusted participants.
Credits
Reported by OSS Scanner (ANT-2026-5VU02NND).
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Windows read-handle oplock holds stale soft-lock recovery past timeout
CVE-2026-144389 / GHSA-6hxh-7x44-pwfg
More information
Details
Impact
On Windows, a local account with read access to a stale soft-lock marker can delay recovery beyond the caller’s acquisition timeout. This affects
SoftFileLock,MarkerSoftFileLockandSoftFileLeasewhen another process holds a read-handle opportunistic lock on the stale marker.Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Filelock now bounds the wait for the stale-marker rename and treats a canceled rename as contention. A single attempt, including a nonblocking one, can still spend roughly half a second in that rename. Restrict read access to the marker through its parent directory’s ACL. Fix in PR #984.
Credits
Reported by the filelock scanner: ANT-2026-82MUV4ZM.
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Mixed strict and soft locks can overlap after foreign sentinel removal
CVE-2026-144403 / GHSA-6w8w-m5rc-xhvp
More information
Details
Impact
On POSIX, a
StrictSoftFileLockholder and a soft-lock client using the same path could both enter their critical sections if another account owned the sentinel in a shared sticky directory. This compromises mutual exclusion during a mixed-client migration. The report established overlapping holds.Affected versions and mitigation
Confirmed affected:
= 4.2.12. Upgrade to4.3.0.Strict acquisition now refuses a sentinel owned by an untrusted account. Use a directory writable only by the participating account, or use strict clients consistently. Where a shared sticky directory is required, provision the sentinel under the locking account or directory owner before adding clients. Fix in PR #992
Credits
OSS Scanner: ANT-2026-DYZMWIDJ (mixed strict/soft variant).
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Linux overflow UID can admit attacker-owned lock trees
CVE-2026-144382 / GHSA-7mx6-8qvh-pvc4
More information
Details
Impact
A Linux user namespace can report the same overflow UID for unrelated host accounts. When the namespace shares a sticky lock directory with the host,
SoftReadWriteLockcan accept another account's protocol tree as trusted and admit a reader while a writer holds the lock.Affected versions and fix
The confirmed affected version is 4.2.12. Upgrade to filelock
4.3.0or later. The ownership check rejects an ambiguous overflow UID instead of treating matching numeric IDs as proof of ownership. PR #977Workaround
Use a lock directory with a verified, mapped owner where untrusted accounts cannot supply or replace the protocol tree.
Credits
Reported by OSS Scanner (ANT-2026-50TKW02X).
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Temporary-directory exhaustion can expose files through strict lock publication
CVE-2026-144388 / GHSA-8f2v-28m2-26xx
More information
Details
Impact
On Unix, temporary-directory exhaustion during filelock import can disable a safeguard in
StrictSoftFileLockpublication. A local account with rename access to entries in a shared, non-sticky lock directory can gain read access to a file on the same filesystem. The confirmed case involved a world-readable file whose enclosing directory prevented access.Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
An environmental failure during the capability check now preserves the runtime’s advertised support for linking without following symlinks. Filelock can refuse acquisition if the runtime cannot honor that option. Use a lock directory whose entries and ancestors other accounts cannot rename, and restrict read permission on sensitive files. Fix in PR #990.
Credits
OSS Scanner: ANT-2026-E88H6SCI.
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Failed async release can unlock under a later holder
CVE-2026-144383 / GHSA-8gxc-gmm5-cjc4
More information
Details
Impact
An async lock can lose mutual exclusion after executor submission raises during release. A thread pool may already have queued the release. If the application reuses the same lock instance, that release can run during a later hold and allow another process to enter. On Linux, a local account sharing the application’s process and thread quota could trigger the submission failure.
Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Async exclusive and reader/writer locks now cancel a queued backend call when submission fails, or settle its result if it already started. Isolate the application’s thread allowance from untrusted accounts. On an affected version, stop work that depends on the lock and restart the process after a submission failure. Fix in PR #986.
Credits
Reported in the filelock scan as ANT-2026-BZ7APGNK.
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Untrusted lock waits can stall release of private async locks
CVE-2026-144340 / GHSA-c7vg-7rqj-fjhq
More information
Details
Impact
Concurrent
AsyncSoftReadWriteLockwaits could occupy every worker in the default executor and delay the release of an unrelated private lock in the same process. This requires enough simultaneous waits and a workload that uses lock paths another account can influence, such as a group-writable, non-sticky directory.Affected versions and mitigation
Confirmed affected:
= 4.2.12. Upgrade to4.3.0.Each soft reader/writer wrapper now has a worker of its own by default. If the application supplies a shared executor, keep a worker available for releases. Limit concurrent waits and keep lock directories private or use appropriately protected sticky directories. Fix in PR #1073
Credits
Scan
filelock-20261116-009; findingANT-2026-O69ASZD0.Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Failed async lock construction disables fork resets for other locks
CVE-2026-144335 / GHSA-cx2x-xp53-fq3w
More information
Details
Impact
On POSIX, an
AsyncReadWriteLockconstructor failure could prevent a forked child from resetting unrelated locks, including locks in private directories. The process had to retain the failed construction and then fork. A local account able to populate an optional lock path could cause the initial failure. Overlapping holds were demonstrated only when the child reused an active SQLite lock before exec, an unsupported operation.Affected versions and mitigation
Confirmed affected:
= 4.2.12. Upgrade to4.3.0.The wrapper now registers for fork cleanup after construction succeeds. Keep optional lock paths in trusted directories. On the affected release, restart the process before forking after a retained constructor failure. Children must still exec or exit before using an inherited active SQLite lock. Fix in PR #1031
Credits
Scan
filelock-20261116-009; findingANT-2026-M5X2RGHK.Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Read-only oplock can hold strict lock acquisition past its timeout
CVE-2026-144392 / GHSA-f37p-fqrx-f498
More information
Details
Impact
On Windows, a local account with read access to an idle
StrictSoftFileLocksentinel can delay acquisition beyond the requested timeout. A Windows opportunistic lock (oplock) on the sentinel can keep the caller’s thread waiting inside the operating system, including during a nonblocking acquisition.Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Filelock now opens the sentinel without waiting for an outstanding oplock break, letting the caller handle contention, cancellation and timeouts. Restrict sentinel read access to participating accounts. This fix covers opening the sentinel during acquisition. Fix in PR #987.
Credits
Reported in the filelock scan as ANT-2026-9GI58YA1.
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Planted claims delay bounded StrictSoftFileLock acquires
CVE-2026-144333 / GHSA-f65c-c2qh-wf3m
More information
Details
Impact
If another local account can write to a
StrictSoftFileLockclaims directory, a crowded directory can delay nonblocking and timed acquisitions and increase the caller's memory use. The effect concerns availability of that shared lock.Affected versions and mitigation
Confirmed affected:
= 4.2.12. Upgrade to4.3.0.Acquisition now limits how many records it examines. A crowded directory can still cause a timeout or a
SoftFileLockProtocolError; theclaimsinspection property still enumerates all public claims. Restrict write access to the claims directory and its parent. Fix in PR #1040Credits
OSS security report, ANT-2026-Q3X5FCZO.
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: SoftReadWriteLock admits overlapping writers after directory inode reuse
CVE-2026-144394 / GHSA-fff3-xpx8-wvvv
More information
Details
Impact
On Linux, two processes can both hold a
SoftReadWriteLockwrite lock after its protocol directory is removed while a lock instance remains alive. This requires another account able to replace directories in the shared location and filesystem reuse of a previously trusted inode number. The overlap was confirmed on ext4, without a compromise notification.Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Filelock now checks ownership and permissions each time it opens a protocol directory. Keep the lock tree in place while lock instances are in use. If the tree must be removed, stop the processes that used it before resuming lock operations. Fix in PR #988.
Credits
OSS Scanner: ANT-2026-STIBT5PU.
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Planted Windows path prevents private soft-lock recovery
CVE-2026-144334 / GHSA-fmp2-7mgr-gp5h
More information
Details
Impact
On Windows, a local account allowed to create drive-root directories can influence the owner identity recorded by
SoftFileLockandMarkerSoftFileLock, including for locks in a private directory. If the holder dies, later processes can mistake the dead owner's marker for a remote hold and leave the lock unavailable.Affected versions and mitigation
Confirmed affected:
= 4.2.12. Upgrade to4.3.0.Windows now skips the Linux PID-namespace probe. Use the native Windows
FileLockwhere suitable. For an existing stranded marker, verify that the holder has exited before usingbreak_lock(). A finite lifetime can also expire a live holder. Fix in PR #1036Credits
Scan
filelock-20261116-009; findingANT-2026-K9PQD1EN.Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: Strict soft lock can chmod unrelated directory
CVE-2026-144381 / GHSA-gqj6-5294-r46r
More information
Details
Impact
In a group-writable directory without the sticky bit,
StrictSoftFileLockcan mistake an unrelated directory owned by the locking account for its coordination directory. It can change that directory's permissions and create a claims directory inside it, disrupting access for other users.Affected versions and fix
The confirmed affected version is 4.2.12. Upgrade to filelock
4.3.0or later. The lock checks the claims directory and its entries before changing permissions. PR #978Workaround
Use a trusted parent directory where other accounts cannot rename entries.
Credits
Reported by OSS Scanner (ANT-2026-8ERL4V7J).
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
filelock: SoftFileLock recovery can admit two holders through a live break name
CVE-2026-144350 / GHSA-gvhc-qmqx-22pq
More information
Details
Impact
On POSIX filesystems with atomic name exchange,
SoftFileLockcan misidentify an active recovery record as abandoned. If another local account can create markers in the shared sticky lock directory, racing recoveries can let two holders enter the same critical section.Affected versions and fix
Versions 4.2.1 through 4.2.12 are affected. Upgrade to filelock
4.3.0or later. Recovery leaves a break record in place while the process identified by its name is running. PID reuse can therefore delay cleanup. PR #974Workaround
Keep the lock in a directory writable only by trusted participants.
Credits
Reported by OSS Scanner (ANT-2026-01PM0HYF).
Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:LReferences