MediumCVE-2026-112936

    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..*

    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:

    1. The attacker runs ln -s /home/victim/private/pwned.flag /shared/app.rwlock.db.
    2. The victim constructs ReadWriteLock("/shared/app.rwlock.db"). A plain os.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.
    3. 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 products
    Affected versionsFixed in
    tox-devfilelock
    • ≥ 3.20.4, < 4.0.9
    • 3.20.4 – < 4.0.9
    • —
    • 4.0.9
    pipfilelock
    • >= 3.20.4, <= 4.0.8
    • 4.0.9
    pypifilelock
    • 3.24.2
    • 4.0.8
    • 3.31.1
    • 3.32.3
    • 4.0.1
    • 4.0.2
    • 3.32.2
    • 3.32.5
    • 3.29.0
    • 4.0.0
    • 3.23.0
    • 3.22.0
    • 3.25.1
    • 3.21.0
    • 3.29.5
    • 3.29.3
    • 3.29.1
    • 4.0.3
    • 3.32.6
    • 3.29.4
    • 4.0.4
    • 3.30.0
    • 3.28.0
    • 4.0.5
    • 3.25.2
    • 3.20.4
    • 3.32.4
    • 3.21.1
    • 3.32.0
    • 3.31.0
    • 4.0.6
    • 3.32.7
    • 3.29.6
    • 3.24.1
    • 3.30.1
    • 4.0.7
    • 3.30.3
    • 3.24.0
    • 3.21.2
    • 3.25.0
    • 3.30.2
    • 3.29.7
    • 3.29.2
    • 3.31.2
    • 3.24.3
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • 4.0.9
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    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-59
    • CWE-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.

    Public exploit references
    Reference tagged as exploitgithub.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).

    1. Initial analysis by NVDNVD

      Show 5 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Product configurationadded
      —
      OR *cpe:2.3:a:tox-dev:filelock:*:*:*:*:*:python:*:* versions from (including) 3.20.4 up to (excluding) 4.0.9
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/commit/4d45e83caf7e31f9a12fb44526bdc07f70114f04 Types: Patch
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/releases/tag/4.0.9 Types: Release Notes
      Reference typeadded
      —
      CISA-ADP: https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56 Types: Exploit, Vendor Advisory
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56 Types: Exploit, Vendor Advisory

      Source identifier: nvd@nist.gov

    2. 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
      TypeActionBeforeAfter
      Referenceadded
      —
      https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56
      SSVC assessmentadded
      —
      {"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

    3. ReceivedGitHub

      Show 8 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Descriptionadded
      —
      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.
      CVSSadded
      —
      AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
      Weakness type (CWE)added
      —
      CWE-59
      Weakness type (CWE)added
      —
      CWE-668
      Affected 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>
      Referenceadded
      —
      https://github.com/tox-dev/filelock/commit/4d45e83caf7e31f9a12fb44526bdc07f70114f04
      Referenceadded
      —
      https://github.com/tox-dev/filelock/releases/tag/4.0.9
      Referenceadded
      —
      https://github.com/tox-dev/filelock/security/advisories/GHSA-j8f7-rjxc-mr56

      Source 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.

    Badge preview for CVE-2026-112936
    <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>