CVE-2026-112915
Crafted SQLite DB can stall/hang ReadWriteLock, causing denial of service.
- CVSS 5.5
- CWE-400
- Resource Management
- Local
filelock is a platform-independent file lock for Python. From 3.20.4 until 4.2.1, ReadWriteLock can open a crafted SQLite lock database without bounding schema and query work, allowing another local user who can replace the database to make acquisition stall or hang; versions from 3.20.4 expose this on initial per-instance opening, and versions from 3.30.0 repeat the exposure on every acquisition. This issue is fixed in version 4.2.1.
- CWE
- CWE-400
- CVSS base score
- 5.5
- Published
- 2026-10-20
- OWASP
- A06 Vulnerable and Outdated Components
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Serialization Issues
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Local
- Impact
- Denial of Service (DoS)
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Upgrade filelock to version 4.2.1 or later.
Vulnerable code sample
import os
from filelock import ReadWriteLock
def acquire_resource(db_path: str):
# VULNERABLE: opens crafted SQLite lock DB without bounds
lock = ReadWriteLock(db_path)
with lock.read_lock():
# Placeholder for reading protected data
pass
with lock.write_lock():
# Placeholder for writing protected data
passPatched code sample
import os
from filelock import ReadWriteLock
def acquire_resource(db_path: str):
# FIX: use separate lock file to avoid opening crafted DB
lock_file = f"{db_path}.lock"
lock = ReadWriteLock(lock_file)
with lock.read_lock():
# Placeholder for reading protected data
pass
with lock.write_lock():
# Placeholder for writing protected data
passPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- 🐛 fix(read-write): keep SQLite off shared names, bound schema (#834) (tox-dev/filelock)
src/filelock/_api.py · BaseFileLock.__init__,src/filelock/_read_write.py,src/filelock/_read_write.py · ReadWriteLock._configure_and_begin,src/filelock/_read_write.py · _connect,src/filelock/_read_write.py · _connect_through_descriptor,src/filelock/_read_write.py · _ForkSafeConnection.close,src/filelock/_read_write.py · _ForkSafeConnection.retain_until_close,src/filelock/_read_write.py · _link_beside,src/filelock/_read_write.py · _owner_is_gone,src/filelock/_read_write.py · _ProbeDescriptors.adopt,src/filelock/_read_write.py · _sweep_links_of_the_dead,src/filelock/_windows.pyand 2 more
Cite this entry
@misc{vaitp:cve2026112915,
title = {{Crafted SQLite DB can stall/hang ReadWriteLock, causing denial of service.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-112915},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-112915/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
