chore(deps): update dependency filelock to v3.20.3 [security] #387
+3
−3
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.



This PR contains the following updates:
3.20.1→3.20.3Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
CVE-2026-22701
Vulnerability Summary
Title: Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock
Affected Component:
filelockpackage -SoftFileLockclassFile:
src/filelock/_soft.pylines 17-27CWE: CWE-362, CWE-367, CWE-59
Description
A TOCTOU race condition vulnerability exists in the
SoftFileLockimplementation of the filelock package. An attacker with local filesystem access and permission to create symlinks can exploit a race condition between the permission validation and file creation to cause lock operations to fail or behave unexpectedly.The vulnerability occurs in the
_acquire()method betweenraise_on_not_writable_file()(permission check) andos.open()(file creation). During this race window, an attacker can create a symlink at the lock file path, potentially causing the lock to operate on an unintended target file or leading to denial of service.Attack Scenario
Impact
What kind of vulnerability is it? Who is impacted?
This is a Time-of-Check-Time-of-Use (TOCTOU) race condition vulnerability affecting any application using
SoftFileLockfor inter-process synchronization.Affected Users:
filelock.SoftFileLockdirectlyFileLockon systems withoutfcntlsupport (e.g., GraalPy)Consequences:
CVSS v4.0 Score: 5.6 (Medium)
Vector: CVSS:4.0/AV:L/AT:L/PR:L/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
Attack Requirements:
Patches
Has the problem been patched? What versions should users upgrade to?
Yes, the vulnerability has been patched by adding the
O_NOFOLLOWflag to prevent symlink following during lock file creation.Patched Version: Next release (commit: 255ed068bc85d1ef406e50a135e1459170dd1bf0)
Mitigation Details:
O_NOFOLLOWflag is added conditionally and gracefully degrades on platforms without supportO_NOFOLLOWsupport (most modern systems): symlink attacks are completely preventedO_NOFOLLOW(e.g., GraalPy): TOCTOU window remains but is documentedUsers should:
UnixFileLockorWindowsFileLockinstead of the fallbackSoftFileLockWorkarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
For users unable to update immediately:
Avoid
SoftFileLockin security-sensitive contexts - useUnixFileLockorWindowsFileLockwhen available (these were already patched for CVE-2025-68146)Restrict filesystem permissions - prevent untrusted users from creating symlinks in lock file directories:
Use process isolation - isolate untrusted code from lock file paths to prevent symlink creation
Monitor lock operations - implement application-level checks to verify lock acquisitions are successful before proceeding with critical operations
References
Are there any links users can visit to find out more?
Reported by: George Tsigourakos (@tsigouris007)
Release Notes
tox-dev/py-filelock (filelock)
v3.20.3Compare Source
What's Changed
Full Changelog: tox-dev/filelock@3.20.2...3.20.3
v3.20.2Compare Source
What's Changed
New Contributors
Full Changelog: tox-dev/filelock@3.20.1...3.20.2
Configuration
📅 Schedule: Branch creation - "" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.