Sceawere
Vulnerability Detail
CVE-2026-112913UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
filelock SQLite Side-Channel Hijacking
Vulnerability Metadata
- Severity
- Low
- Score / CVSS
- 3.3
- Creation Date
- 1d ago
- Vendor
- tox-dev
- Product
- filelock
- Attack Type
- CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
- Vector String
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
- Attack Complexity
- LOW
Narrative and Response
Description
filelock is a platform-independent file lock for Python. From 3.20.4 until 4.2.1, ReadWriteLock and AsyncReadWriteLock on Windows use _connect to attach SQLite to the lock database by pathname, allowing another local account that can create adjacent names to place a database-wal or database-journal side file before acquisition. An undeletable WAL file makes each read or write acquisition fail immediately with sqlite3.OperationalError regardless of timeout. Separately, when the database contains at least one table, a hot journal that grants the lock account modify rights can cause SQLite recovery to delete a file named by that journal only when the lock account has permission to delete the target. The issue requires a directory writable by another account, such as a shared Windows temporary directory, and does not affect private directories. This issue is fixed in version 4.2.1.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "3.3",
"pubDate": "2026-11-05T22:17:47.043Z",
"pubdate": "2026-11-05T22:17:47.043Z",
"executiveSummary": "The filelock library, specifically versions 3.20.4 through 4.2.1, is susceptible to a file-system-based vulnerability involving SQLite database manipulation on Windows systems. The vulnerability exists within the ReadWriteLock and AsyncReadWriteLock mechanisms, which utilize pathname-based database connections. By exploiting shared directory environments, an attacker can manipulate SQLite WAL (Write-Ahead Log) or journal files to facilitate a Denial of Service (DoS) condition or trigger arbitrary file deletion, provided the attacker has write permissions in the target directory.\nThe risk is primarily relevant in multi-user environments where a shared temporary directory is used for lock files. An unprivileged local attacker can place malicious side-car files adjacent to the database path, which are then consumed by the library's SQLite backend during lock acquisition. This leads to immediate operational failures via sqlite3.OperationalError or, under specific conditions, unauthorized file deletion. The vulnerability is mitigated in version 4.2.1.",
"technicalDetails": "The root cause of this vulnerability lies in the insecure path-based initialization of SQLite databases within the ReadWriteLock and AsyncReadWriteLock classes of the filelock library. On Windows, the library uses the _connect method to attach to a lock database; however, it does not sufficiently validate the integrity or ownership of the file system space surrounding the lock database path. This allows local attackers to perform a 'race condition' or pre-emptive file placement attack when the library operates in a shared directory.\nExploitation proceeds via two primary vectors. First, for Denial of Service (DoS), an attacker can create a persistent or undeletable database-wal or database-journal file at the predicted lock database location. When filelock attempts to initialize the lock, the underlying sqlite3 library attempts to process these side-car files. The presence of a malformed or read-only WAL/journal file causes sqlite3.OperationalError upon acquisition attempts. Since the lock acquisition logic fails immediately, any process relying on these locks will experience a systemic failure, bypassing standard timeout configurations.\nThe second vector involves the potential for arbitrary file deletion. When the target database contains at least one table, SQLite's recovery mechanism for hot journals is triggered. If an attacker crafts a hot journal that specifies a target file and possesses the necessary filesystem permissions, the SQLite recovery process may inadvertently delete the file identified by the journal entry. This requires the attacker to have sufficient local permissions to manipulate the journal file and for the process running the filelock instance to have the necessary filesystem privileges to delete the target file.\nThis vulnerability is restricted to Windows environments where the library is configured to use directories with broad write permissions. It does not require remote network access, as the attack is strictly local. The vulnerable components are the ReadWriteLock and AsyncReadWriteLock implementations within versions 3.20.4 through 4.2.0. The attack flow relies on the predictability of the lock database file path, allowing an adjacent local account to occupy the expected workspace before the application attempts to initiate locking operations."
}