MediumCVE-2026-112909

    Tox-dev Filelock: Use of Incorrectly-Resolved Name or Reference (CVE-2026-112909)

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

    What is affected, what to do

    An exploit is publicly available. Update Tox-dev Filelock to version 4.2.1.

    Affected
    • Tox-dev Filelock lt *..4.2.1
    Fixed in
    • Tox-dev Filelock 4.2.1

    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 12.6

    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
    61.77 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
    12.6
    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 22 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-706

    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

    UnixFileLock, the backend of FileLock and AsyncFileLock on Unix, empties whatever regular file it finds at the lock path once it holds the flock (a kernel lock on an open file). With an explicit mode it also chmods that file (sets its permission bits), whether or not this acquire created it. Another local user who can rename or hard-link one of the files of the user running the lock (below: the lock user) onto the lock path gets that file truncated by the lock user's next acquire(). A hard link is a second name for the same file. With a mode such as 0o666 the file, still owned by the lock user, also becomes readable and writable by that other user. The other user can then read and alter everything the lock user writes to it afterwards.

    O_NOFOLLOW, the defence added for the symlink variant (CVE-2025-68146), does not see a renamed file or a hard link. The rename route needs the file's directory to be writable without the sticky bit (a directory flag that lets only a file's owner remove or rename it). The hard-link route into a sticky directory such as /tmp needs fs.protected_hardlinks=0, a Linux kernel setting. Affected versions are every filelock release up to and including 4.2.0 (the truncation is as old as the project; the chmod since 3.10.2).

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

    • ANT-2026-KO573NWI [high, CWE-706]: UnixFileLock truncates and chmods victim files renamed onto the lock path.

    Severity

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

    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:L (low attack complexity): one rename or link, then wait for the lock user's next acquire; no race. I:H (high integrity impact): the lock user's own process truncates a file it did not mean to touch, including content behind a second name the other user could neither modify nor delete. With a permissive explicit mode the other user can then write to it. If that file is one the lock user later executes or trusts, that is code execution as the lock user. C:L (partial confidentiality impact): the old content is gone before the other user can read anything, but what the lock user writes afterwards through a descriptor (the number the kernel gives a process for an open file) it still holds is readable. A:N (no availability impact). S:U (scope unchanged).

    Classification from the review: security, conditional on another user controlling names in a non-sticky directory on the lock's filesystem (or on fs.protected_hardlinks=0). The scanner rated this high. The maintainers score it medium because the reachable targets depend on the directory layout and kernel settings described below.

    Scope and preconditions

    • Lock classes: FileLock and AsyncFileLock on Unix (UnixFileLock). SoftFileLock applies an explicit mode only to a file it created with O_CREAT | O_EXCL and does not truncate an existing file. WindowsFileLock has not truncated at any version.
    • The other user must put a regular file of the lock user at the lock path before the lock user's next acquire, while the lock file does not exist yet. That is the case on first use, after a reboot, after a /tmp cleaner, or after a release with the default preserve_lock_file=False, which unlinks the file. The scanner checked three ways at the scanned commit, with default kernel settings unless stated:
      • rename inside a directory without the sticky bit (a group-writable project or cache directory, a root-created 0777 directory);
      • rename from such a directory into a sticky one (1777) on the same filesystem. The sticky bit only protects entries that already exist, so the move succeeds while the lock path is free. Once the lock user's lock file exists there, the same move fails with EPERM;
      • link(2) into a sticky directory. This needs a system that lets a user hard-link a file it cannot write, which on Linux means fs.protected_hardlinks=0. Mainstream distributions set 1, which refuses the link. The scanner did not test macOS or the BSDs.
    • What the lock user loses: with the default FileLock(path) the lock truncates the file, which keeps its mode. With an explicit mode (a lock shared between users needs 0o666 or 0o660, because UnixFileLock opens the file read-write), the lock also chmods the file to that mode. _apply_explicit_mode suppresses PermissionError only for files the lock user does not own. The lock user owns its own files, so the fchmod succeeds.
    • Trust boundary: the protection against another local user holds only when no other user can rename entries in the lock's directory or, for the rename-into-sticky route, in any directory on the same filesystem that holds a file of the lock user. A user who can rename entries in a non-sticky directory above the lock controls every name below it, which no file-based lock can defend against.
    • Not affected: a symlink (a file that points at another path) at the lock path, because O_NOFOLLOW makes the open fail with ELOOP; mutual exclusion between cooperating processes.

    Affected code

    Scanned commit b831496b0273: UnixFileLock._finalize_locked_fd, whose os.ftruncate and _apply_explicit_mode calls have only the st_nlink != 0 guard (the file still has at least one name); _apply_explicit_mode; _open_lock_file, which learns from its O_EXCL create whether this attempt made the file but hands that flag only to the ENOSYS fallback.

    Introduced

    The truncation of whatever is at the lock path dates from the initial commit (2157efb, which opened with O_TRUNC). The chmod of a pre-existing inode (the kernel's identity for a file, independent of its name) came with d7e1e84 "changed from os.umask to os.chmod" (#206, 2023-03-22), first tag 3.10.2 (verified with git tag --contains). Before it the code passed the mode only to open(), which applies it to a file this call creates. The advisory range is therefore every release up to 4.2.0. The earlier group range >= 3.10.0 understated it, as the review noted.

    Mechanism

    _open_lock_file first tries os.open(path, O_RDWR | O_NOFOLLOW | O_CREAT | O_EXCL, mode). With the lock user's file renamed to the lock path that fails with FileExistsError. The second os.open(path, O_RDWR | O_NOFOLLOW) succeeds, because the entry is a regular file the lock user owns, and returns created = False. _acquire_native passes created only to the ENOSYS branch. No process holds a flock on the renamed file, so _lock_fd_nonblocking(fd) succeeds at once and _finalize_locked_fd(fd) runs: os.fstat, st_nlink != 0, os.ftruncate(fd, 0), then os.fchmod(fd, mode) when the lock has an explicit mode. Nothing in that path tells a lock file from any other regular file; a link count of 2 and a non-empty file both pass. O_NOFOLLOW does not help because the entry is the file itself (or a hard link, an ordinary directory entry for the same inode), not a symlink to it. There is no race: the other user renames or links once and waits for the next acquire. AsyncUnixFileLock inherits _finalize_locked_fd unchanged.

    The scanner measured three variants at the same commit, same accounts (victim

    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
    • < 4.2.1
    • < 4.2.1
    • 4.2.1
    • 4.2.1
    pipfilelock
    • <= 4.2.0
    • 4.2.1
    pypifilelock
    • 3.21.1
    • 0.2.0
    • 3.10.1
    • 2.0.11
    • 3.10.4
    • 4.1.0
    • 2.0.0
    • 3.29.4
    • 1.0.3
    • —
    • 3.10.5
    • 3.24.1
    • 3.21.2
    • 2.0.4
    • 1.0.1
    • 3.15.1
    • 4.0.8
    • 4.0.6
    • 3.11.0
    • 3.6.0
    • 2.0.13
    • 3.8.0
    • 3.28.0
    • 3.15.3
    • 3.0.2
    • 4.0.7
    • 3.3.1
    • 3.29.7
    • 3.13.3
    • 3.10.3
    • 3.10.6
    • 3.3.0
    • 4.0.9
    • 3.0.3
    • 3.24.0
    • 3.13.4
    • 4.0.2
    • 3.23.0
    • 3.25.1
    • 2.0.8
    • 3.14.0
    • 3.9.1
    • 3.0.0
    • 3.4.1
    • 3.20.3
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • 4.2.1
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    Vendors and products

    Weakness classes (CWE)

    • CWE-706Use of Incorrectly-Resolved Name or Reference

      Class

      The product uses a name or reference to access a resource, but the name/reference resolves to a resource that is outside of the intended control sphere.

      Entry at MITRE CWE-706

    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-69hj-f68j-2879x_refsource_CONFIRM, Exploit, Mitigation, Patch, Vendor advisory, web
    • NVD (NIST)vuln/detail/CVE-2026-112909advisory
    • 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 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-69hj-f68j-2879 Types: Exploit, Mitigation, Patch, Vendor Advisory
      Reference typeadded
      —
      GitHub, Inc.: https://github.com/tox-dev/filelock/security/advisories/GHSA-69hj-f68j-2879 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-69hj-f68j-2879
      SSVC assessmentadded
      —
      {"id":"CVE-2026-112909","role":"CISA Coordinator","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"version":"2.0.3","timestamp":"2026-10-22T21:24:59.918929Z"}

      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. Prior to 4.2.1, UnixFileLock can truncate a regular file renamed onto the lock path when another local user has actual rename permission, or hard-linked there under a permissive hard-link policy; when an explicit mode is requested, affected versions from 3.10.2 can also change that file's mode. This issue is fixed in version 4.2.1.
      CVSSadded
      —
      AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
      Weakness type (CWE)added
      —
      CWE-706
      Affected versions (publisher)added
      —
      New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/112xxx/CVE-2026-112909.json">CVE-2026-112909</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-69hj-f68j-2879

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