filelock: Shared-directory entries delay read-write locks beyond timeoutGHSA-5qxg-3g64-7g62
LOWFix: tox-dev/filelock@d7324f5GHSA-5qxg-3g64-7g62 is a low-severity (CVSS 3.3) CWE-770 vulnerability. A fix is available — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-5qxg-3g64-7g62.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Description
filelock is a platform-independent file lock for Python. Prior to 4.3.0, on POSIX, another account with write access to the parent directory of a SQLite lock database can make ReadWriteLock initialization and acquisition run past their requested timeout, even when the lock is free. AsyncReadWriteLock constructs the same backend on the event-loop thread, so a slow initialization can also delay other tasks. This issue is fixed in version 4.3.0.
Detection & mitigation playbook
VulnerabilityDetect
Identify every host running the affected component and compare the installed build against the fixed version below — for source-built or distro-packaged software the version string, not a lockfile, is the source of truth (`dpkg -l`, `rpm -q`, or the binary's own `--version`).
Fix
Upgrade the affected component to the fixed release for GHSA-5qxg-3g64-7g62, or apply your distribution's backported patch — distro builds are often patched at an older version number, so check your vendor's advisory rather than the upstream version alone.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated as Low severity because exploitation requires local system access and write permissions in a shared parent directory where a SQLite lock database is stored. Under these conditions, an unprivileged local user can manipulate directory states to delay lock initialization and acquisition beyond…
To mitigate this flaw, ensure that filelock SQLite lock databases are stored in secure parent directories where write access is restricted solely to the application owner. Avoid using shared or world-writable directories (such as `/tmp`) for storing lock files without enforcing strict directory permissions or utilizing dedicated per-user runtime directories. Caveats: Applications designed to share lock files across multiple local user accounts in common directories will need to restrict directory access, which may require adjusting permissions or directory locations.Source: Red Hat security advisory for GHSA-5qxg-3g64-7g62 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-5qxg-3g64-7g62 in your dependencies?
Find it across your dependency tree, including transitive dependencies.