Description
filelock is a platform-independent file lock for Python. From 3.10.0 until 4.2.1, filelock on Windows ignores the mode argument for WindowsFileLock files and the ReadWriteLock SQLite database. A lock created with mode=0o600 receives the parent directory's inheritable ACL because _open_non_reparse_fd and _nt_open do not create an owner-only security descriptor. Another local account with inherited access can read holder metadata or the lock database, modify those files where the ACL permits writes, or take the byte-range lock after release and delay later acquisitions. UnixFileLock is not affected, and mutual exclusion between cooperating processes continues to hold. This issue is fixed in version 4.2.1.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| tox-dev | filelock | >= 3.10.0, < 4.2.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | python-filelock | No fix yet | — |
| Ubuntu 26.04 LTS | python-filelock | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | python-filelock | No fix yet | — |
| Ubuntu Pro 22.04 LTS | python-filelock | No fix yet | — |
| Ubuntu Pro 20.04 LTS | python-filelock | No fix yet | — |
| Ubuntu Pro 18.04 LTS | python-filelock | No fix yet | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python-filelock | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | superset-6.1 | 6.1.0-r23 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | filelock | >= 3.10.0, < 4.2.1 | 4.2.1 | GHSA-8mx5-7m5m-r77g |
References
- https://github.com/tox-dev/filelock/security/advisories/GHSA-8mx5-7m5m-r77g
- https://github.com/tox-dev/filelock/pull/835
- https://github.com/tox-dev/filelock/commit/72786d41aa25159ad28c1bcf4291738b135b2c6c
- https://github.com/tox-dev/filelock/commit/e1e825b1992f69fb6b346dc395d5ae4893536c0a
- https://github.com/tox-dev/filelock/releases/tag/4.2.1