filelockで任意のファイルを上書きされるおそれ
Summary
Python向けファイルロックライブラリのfilelockに、ReadWriteLockがSQLiteのデータベースとサイドファイルを名前で開き直すことに起因する脆弱性があります。POSIX系システムでrename権限を持つ攻撃者が名前を差し替えることで、ファイルの上書きや削除が起きるおそれがあり、深刻度は高とされています。影響を受けるのは3.20.4から4.2.1未満の版で、修正版は4.2.1です。最新の情報を確認してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Python向けファイルロックライブラリのfilelockに、ReadWriteLockがSQLiteのデータベースとサイドファイルを名前で開き直すことに起因する脆弱性があります。POSIX系システムでrename権限を持つ攻撃者が名前を差し替えることで、ファイルの上書きや削除が起きるおそれがあり、深刻度は高とされています。影響を受けるのは3.20.4から4.2.1未満の版で、修正版は4.2.1です。最新の情報を確認してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| tox-devfilelock | — | Not listed |
| pipfilelock |
< 4.2.1→ 4.2.1 |
4.2.1 |
| PyPIfilelock |
≥ 3.20.4, < 4.2.1→ 4.2.1 |
4.2.1 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-112940 python-filelock Fix available
- Ubuntu UBUNTU-CVE-2026-112940 python-filelock No fixed version in this record
Original description The description as published by the source.
filelock is a platform-independent file lock for Python. From 3.20.4 until 4.2.1, ReadWriteLock let SQLite reopen the database and side files by name; on POSIX systems an attacker with rename access in a non-sticky parent can swap those names to cause overwrite or unlink operations, while a writable adjacent hot journal is additionally required for attacker-chosen content overwrites. This issue is fixed in version 4.2.1.
Source: NIST National Vulnerability Database NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- REDHAT Red Hat
- web github.com
- web github.com