LowCVE-2026-112912

    Tox-dev Filelock: Link Following (CVE-2026-112912)

    Published Last modified Sources: OSV, Hersteller, CVE.org

    What is affected, what to do

    An exploit is publicly available. Update filelock to version 4.2.1.

    Affected
    • Tox-dev Filelock gte 3.32.6, < 4.2.1..*

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    2.5

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: Vendor (CNA), CVSS v3

    2.5

    CVSS v3

    Severity Low 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 11.7

    Show all metrics
    Severity
    Low
    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
    43.59 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
    2.5 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
    2.5
    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
    11.7
    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

    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

    raise_on_not_writable_file() is the check that SoftFileLock and the locks sharing its acquire path run before every attempt. It looks at the lock path with os.lstat, so that it judges a planted symlink (a file that points at another path) by itself. When the node has no owner-write bit, it then calls os.access(filename, os.W_OK), which follows symlinks. A local user who can create entries in the lock's directory can swap the path between a mode-0466 file and a symlink to a path of their choosing. The second call then reports on the symlink's target with the permissions of the user running the lock (below: the lock user). The lock user's acquire() ends in PermissionError within a fraction of a second when the target is missing or not writable by the lock user, and in the ordinary Timeout otherwise.

    That yields one bit per watched acquire. The bit says whether a path exists and is writable by the lock taker. It covers paths under directories the other user cannot search, or any path when root takes the lock. The lock does not open, create or modify anything through the symlink. On Linux, fs.protected_symlinks (a kernel setting that refuses to follow another user's symlink in a sticky world-writable directory) blocks it in a directory such as /tmp. It does not block it in a 0777 directory without the sticky bit (a directory flag that lets only a file's owner remove or rename it) or in a sticky group-writable one. This reopens the leak PR #567 closed. Affected versions are filelock 3.32.6 through 4.2.0.

    Anthropic's OSS Scanner reported this in private. Finding covered by this advisory:

    • ANT-2026-RQ91AXTW [medium, CWE-59]: Symlink TOCTOU in raise_on_not_writable_file leaks file existence.

    Severity

    CVSS 3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N scores 2.5 (Low).

    AV:L (local): the other user needs an account on the same host. PR:L (low privileges): an ordinary account is enough. UI:N (no user interaction). AC:H (high attack complexity): the swap has to land between two system calls a few bytecodes apart (6 to 12 % of back-to-back acquires with the other user on a second CPU, 1 in 8 000 on one CPU), and the other user has to observe how the lock user's acquire ended. C:L (partial confidentiality impact): one bit per acquire (existence or writability of a chosen path), no content. I:N and A:N (no integrity or availability impact). S:U (scope unchanged).

    Classification from the review: security, conditional, "a one-bit probe of a victim-only path" that "Linux protected symlinks block in the common sticky /tmp case, but not every shared directory". The scanner rated this medium. The maintainers score it low for the complexity and the one-bit yield.

    Scope and preconditions

    • The affected classes are SoftFileLock and everything that reuses its _acquire: MarkerSoftFileLock, SoftFileLease, the async soft locks, and FileLock after an ENOSYS fallback to a soft lock. UnixFileLock itself does not call the helper. WindowsFileLock._acquire() does, but on Windows os.access reads the link's own read-only attribute and does not follow it; that branch did not run.
    • The other user must be able to create entries in the lock's directory. With Linux defaults (fs.protected_symlinks=1) the kernel refuses the lock user's attempt to follow another user's symlink in a directory that is both sticky and world-writable. /tmp therefore gives PermissionError for every target and leaks nothing. A 0777 directory without the sticky bit, or a sticky group-writable one (1770 with a shared group), has no such cover and leaks as described. macOS and the BSDs have no fs.protected_symlinks, and a symlink there has mode bits of its own, so one without the owner-write bit would reach os.access with no swap at all (not executed).
    • The swap is practical only with a second CPU for the other user.
    • The other user needs to see how the lock user's acquire ended, for example the exception in a shared log, an exit status, or when the job stopped (PermissionError ends a blocking acquire within about a second; the other case runs to its timeout). The scanner also observed a variant that needs no output from the lock user. Hold the soft lock, set the marker (the lock file whose presence says a process holds the lock) to mode 0o066, swap the symlink in and out for a few seconds, release, and see whether a marker owned by the other uid appears. A contender still waiting takes the lock; one that raised is gone.
    • The O_NOFOLLOW open that follows the check is not affected. The lock does not read, create or modify anything through the symlink.

    Affected code

    Scanned commit b831496b0273: in raise_on_not_writable_file, the os.lstat that states the invariant and the os.access call that follows symlinks; the call from SoftFileLock._acquire at the start of every poll.

    Introduced

    f2f7b86 "fix: respect ACL write access when the owner write bit is absent" (#728, 2026-09-08), first tag 3.32.6 (verified), appended the os.access call to the not S_IWUSR test. #567 (022394c, first tag 3.29.5) had changed the helper from os.stat to os.lstat so that a symlink planted at the lock path could not probe its target.

    Mechanism

    SoftFileLock._acquire calls the helper first, once per poll_interval (0.05 s by default) for as long as the lock user waits. The helper runs os.lstat(path). When the node has no S_IWUSR it runs os.access(path, os.W_OK, effective_ids=...) without follow_symlinks=False. On current Linux that is faccessat2(AT_FDCWD, path, W_OK, AT_EACCESS), which resolves a symlink. If that returns false, a second os.lstat confirms a node is still there and the helper raises PermissionError. The other user's planted file has mode 0466: no owner-write bit, which sends the helper on to os.access, and other-writable, so that os.access on the file itself says yes. The other user alternates the file and a symlink at the path (os.replace of a fresh symlink, then os.replace of a hard link to the marker; the lock would evict a symlink left for 2 s as a malformed marker).

    One call of the helper then goes one of three ways. First, lstat sees the symlink (mode 0777 on Linux, S_IWUSR set), os.access is not called, the helper returns. Second, lstat sees the file and os.access sees the file: true, returns. Third, lstat sees the file and os.access sees the symlink, resolved to its target with the lock user's permissions: returns if the lock user may write the target, otherwise raises PermissionError. After a return, the O_CREAT | O_EXCL | O_NOFOLLOW open fails with EEXIST and the poll ends as "lock is held". PermissionError therefore comes only from the third way and only for a target the lock user cannot write, and it leaves acquire() at once instead of after the timeout.

    The scanner measured what the outcome encodes with 4 000 non-blocking acquires per target as victim (uid 1000, 0700 private directory). An existing file or directory of victim: 0 PermissionError. A missing name there gives 311 to 339. A 0444 file of victim: 433 to 460. /etc/passwd or /etc/shadow: 237 to 422. With root taking the lock the answer is plain existence, 0 for /etc/shadow and /root/.bashrc, 366 for a missing name under /root. A symlink alone at the path, without the swap, tells nothing (2 000 Timeout of 2 000 for both targets, then evicted as malformed afte

    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.32.6, < 4.2.1
    • 3.32.6 – < 4.2.1
    • —
    • 4.2.1
    pipfilelock
    • >= 3.32.6, <= 4.2.0
    • 4.2.1
    pypifilelock
    • 4.1.1
    • 3.32.6
    • 4.0.0
    • 4.0.10
    • 4.0.12
    • 4.0.4
    • 4.0.1
    • 4.1.0
    • 4.0.3
    • 4.0.8
    • 4.0.11
    • 4.2.0
    • 4.0.5
    • 4.1.2
    • 3.32.7
    • 4.0.9
    • 4.0.6
    • 4.0.7
    • 4.0.2
    • —
    • 4.2.1
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    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

    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/e1e825b1992f69fb6b346dc395d5ae4893536c0ax_refsource_MISC, Patch, web
    • github.comtox-dev/filelock/pull/835x_refsource_MISC, Patch, web
    • github.comtox-dev/filelock/releases/tag/4.2.1x_refsource_MISC, Release notes, web
    • github.comtox-dev/filelock/security/advisories/GHSA-9j6q-wvj5-jgjgx_refsource_CONFIRM, Exploit, Mitigation, Patch, Vendor advisory, web
    • NVD (NIST)vuln/detail/CVE-2026-112912advisory
    • 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 6 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.32.6 up to (excluding) 4.2.1
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/commit/e1e825b1992f69fb6b346dc395d5ae4893536c0a Types: Patch
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/pull/835 Types: Patch
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/releases/tag/4.2.1 Types: Release Notes
      Reference typeadded
      —
      CISA-ADP: https://github.com/tox-dev/filelock/security/advisories/GHSA-9j6q-wvj5-jgjg Types: Exploit, Mitigation, Patch, Vendor Advisory
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/security/advisories/GHSA-9j6q-wvj5-jgjg Types: Exploit, Mitigation, Patch, 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-9j6q-wvj5-jgjg
      SSVC assessmentadded
      —
      {"id":"CVE-2026-112912","role":"CISA Coordinator","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"version":"2.0.3","timestamp":"2026-10-20T15:37:27.795354Z"}

      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.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. This issue is fixed in version 4.2.1.
      CVSSadded
      —
      AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
      Weakness type (CWE)added
      —
      CWE-59
      Affected versions (publisher)added
      —
      New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/112xxx/CVE-2026-112912.json">CVE-2026-112912</a>
      Referenceadded
      —
      https://github.com/tox-dev/filelock/commit/e1e825b1992f69fb6b346dc395d5ae4893536c0a
      Referenceadded
      —
      https://github.com/tox-dev/filelock/pull/835
      Referenceadded
      —
      https://github.com/tox-dev/filelock/releases/tag/4.2.1
      Referenceadded
      —
      https://github.com/tox-dev/filelock/security/advisories/GHSA-9j6q-wvj5-jgjg

      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-112912
    <a href="https://intel.neosec.eu/en/cve/CVE-2026-112912"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-112912.svg?lang=en" alt="CVE-2026-112912 – NEOSEC Intel" height="20"></a>