filelock: ReadWriteLock follows a symlink at the lock path into SQLite (CVE-2026-112936)
Published Last modified Sources: OSV, Hersteller, CVE.org
What is affected, what to do
An exploit is publicly available. Update filelock to version 4.0.9.
- Affected
- Tox-dev Filelock
gte 3.20.4, < 4.0.9..*
- Tox-dev Filelock
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
6.1
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: Vendor (CNA), CVSS v3
6.1
CVSS v3
Severity Medium on the scale from 0 to 10.
Source: OSV, Hersteller, CVE.org
0.2 %
EPSS score
Low — model estimates < 1% exploitation likelihood.
Source: FIRST EPSS, percentile 14.1
Show all metrics
- Severity
- Medium
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 62.10 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- PoC (publicly reported)
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 6.1 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 6.1
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 0.2 %
- Low — model estimates < 1% exploitation likelihood.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 14.1
- Elevated — this CVE ranks above at least 10% of all CVEs scored today.
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- —
- Published
- CISA assessment (SSVC)
- Exploitation: proof of concept · not automatable · Technical impact: partial
- Source: CISA Vulnrichment, as of 20 October 2026
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-59, CWE-668
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Handle the vulnerability in regular vulnerability handling under Art. 21(2)(e) NIS2.
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- From 11.12.2027, Annex I Part II CRA requires manufacturers of affected products with digital elements to handle vulnerabilities without delay and provide security updates.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
Description
Summary
ReadWriteLock and AsyncReadWriteLock resolve the lock path with pathlib.Path.resolve() and pass it to sqlite3.connect() without refusing a symlink. A local user who can create names in the lock's directory, such as /tmp or a shared cache, can plant a symlink at the lock path and make the victim's process create, lock, or write the file it points to, or break mutual exclusion between the victim's own processes.
Details
ReadWriteLock.__init__ stores pathlib.Path(lock_file).resolve(), which follows a final symlink, and every connection opens that path through sqlite3.connect() with no O_NOFOLLOW or regular-file check. SQLite's own VFS also resolves the final symlink in user space, so fs.protected_symlinks and the sticky bit do not help: the kernel never sees a symlink to refuse. The other lock classes do not follow a final symlink: FileLock opens with O_NOFOLLOW, and SoftReadWriteLock coordinates through <path>.rw/.
Proof of concept
On Linux, with the victim and attacker as different users and /shared mode 1777 with fs.protected_symlinks=1:
- The attacker runs
ln -s /home/victim/private/pwned.flag /shared/app.rwlock.db. - The victim constructs
ReadWriteLock("/shared/app.rwlock.db"). A plainos.open(..., O_NOFOLLOW)on the same path fails, but the lock creates/home/victim/private/pwned.flag, owned by the victim, inside a directory the attacker cannot write. - With
/shared/cache.rwlock.db -> /shared/a.db, one victim process holds the write lock. The attacker repoints the link to/shared/b.db, and a second victim process acquires the write lock while the first still holds it.
The same behavior reproduces on macOS, on Windows 11, and through AsyncReadWriteLock.
Impact
A local attacker with write access to the lock directory can make the victim create empty files it owns at paths the attacker cannot write, make the victim hold a SQLite lock on another application's database so that application gets database is locked, and give two victim processes the write lock at once, letting them corrupt the resource the lock protects.
Workarounds
Keep ReadWriteLock paths in directories that only trusted users can write.
Source: OSV (Open Source Vulnerabilities), GitHub Security Advisories, NVD (NIST), cvelistv5
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| tox-dev | filelock |
|
|
| pip | filelock |
|
|
| pypi | filelock |
|
|
Vendors and products
Weakness classes (CWE)
CWE-59Improper Link Resolution Before File Access ('Link Following')
Base
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
Entry at MITRE CWE-59CWE-668Exposure of Resource to Wrong Sphere
Class
The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.
Entry at MITRE CWE-668
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| Reference tagged as exploit | github.com (opens in a new tab) | PoC (publicly reported)reported, not verified | — |
References & sources
- github.comtox-dev/filelock/commit/4d45e83caf7e31f9a12fb44526bdc07f70114f04x_refsource_MISC, Patch, web
- github.comtox-dev/filelock/releases/tag/4.0.9x_refsource_MISC, Release notes, web
- github.comtox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56x_refsource_CONFIRM, Exploit, Vendor advisory, web
- NVD (NIST)vuln/detail/CVE-2026-112936advisory
- github.comtox-dev/filelockpackage
Changes to this CVE
Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).
Initial analysis by NVDNVD
Newly listed as affected:- Tox-dev Filelock (3.20.4 – before 4.0.9)
Show 5 original changes
Individual changes of this event as published by NVD Type Action Before After Product configuration added —OR *cpe:2.3:a:tox-dev:filelock:*:*:*:*:*:python:*:* versions from (including) 3.20.4 up to (excluding) 4.0.9Reference type added —GitHub, Inc.: https://github.com/tox-dev/filelock/commit/4d45e83caf7e31f9a12fb44526bdc07f70114f04 Types: PatchReference type added —GitHub, Inc.: https://github.com/tox-dev/filelock/releases/tag/4.0.9 Types: Release NotesReference type added —CISA-ADP: https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56 Types: Exploit, Vendor AdvisoryReference type added —GitHub, Inc.: https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56 Types: Exploit, Vendor AdvisorySource identifier: nvd@nist.gov
Record modifiedCISA ADP
CISA assessment (SSVC): exploitation: proof of concept, automatable: no
Show 2 original changes
Individual changes of this event as published by NVD Type Action Before After Reference added —https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56SSVC assessment added —{"id":"CVE-2026-112936","role":"CISA Coordinator","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"version":"2.0.3","timestamp":"2026-10-20T16:47:15.788698Z"}Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0
ReceivedGitHub
CVSS V3.1: AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
Weakness type: CWE-59, CWE-668
Description added or changed
Show 8 original changes
Individual changes of this event as published by NVD Type Action Before After Description added —filelock is a platform-independent file lock for Python. From 3.20.4 until 4.0.9, ReadWriteLock and AsyncReadWriteLock versions from 3.20.4 resolve the lock path and pass it to SQLite without rejecting a final symbolic link, allowing another local user who can create names in the lock directory to redirect database creation and locking or split mutual exclusion between targets. This issue is fixed in version 4.0.9.CVSS added —AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:LWeakness type (CWE) added —CWE-59Weakness type (CWE) added —CWE-668Affected versions (publisher) added —New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/112xxx/CVE-2026-112936.json">CVE-2026-112936</a>Reference added —https://github.com/tox-dev/filelock/commit/4d45e83caf7e31f9a12fb44526bdc07f70114f04Reference added —https://github.com/tox-dev/filelock/releases/tag/4.0.9Reference added —https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56Source identifier: security-advisories@github.com
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2026-112936"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-112936.svg?lang=en" alt="CVE-2026-112936 – NEOSEC Intel" height="20"></a>