Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. filelock
  4. ›
  5. CVE-2026-112938

CVE-2026-112938: filelock: StrictSoftFileLock follows a symbolic link swapped in at <path>.filelock and creates claim files in a directory another local user chooses

October 28, 2026

StrictSoftFileLock and AsyncStrictSoftFileLock check <path>.filelock (the coordination directory that holds the lock’s state) with one lstat call on its name. lstat reports what a name is without following a symbolic link (a file that redirects to another path). After that check, the code reaches <path>.filelock/claims by pathname for every later operation (mkdir, scan, publish, link, unlink). _open_directory passes O_NOFOLLOW (a flag that makes an open fail when the final name is a symbolic link), but the flag covers only the final claims component. The kernel follows a symbolic link in any earlier component.

Another local user (the other user below) who can rename <path>.filelock exchanges it for a symbolic link after the check. In a shared directory without the sticky bit (a directory flag that lets only a file’s owner rename or remove it), any user with write access can do this. Where the shared directory is sticky, such as /tmp, only the user who created <path>.filelock before the user running the lock (the lock user below) first used it can. The lock user’s process (root’s, if root takes the lock) then creates a claims directory and claim files (the files whose presence says a process wants or holds the lock) inside a directory the other user chooses but only the lock user can write.

When the link points at another strict lock’s .filelock directory, the stranded claims make that lock time out for every process until an operator finds and force-breaks each one. The claims property and force_break() resolve the same path with no check at all. Affected versions: filelock >= 3.30.0 and <= 4.2.0 (finding ANT-2026-SVFEYX89).

References

  • github.com/advisories/GHSA-m462-7rxw-wvpg
  • github.com/tox-dev/filelock/commit/bfa066d65a1ba9106f86ee9d027f7588b9c77e03
  • github.com/tox-dev/filelock/pull/839
  • github.com/tox-dev/filelock/releases/tag/4.2.1
  • github.com/tox-dev/filelock/security/advisories/GHSA-m462-7rxw-wvpg
  • nvd.nist.gov/vuln/detail/CVE-2026-112938

Code Behaviors & Features

Detect and mitigate CVE-2026-112938 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.30.0 before 4.2.1

Fixed versions

  • 4.2.1

Solution

Upgrade to version 4.2.1 or above.

Impact 5.8 MEDIUM

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H

Learn more about CVSS

Weakness

  • CWE-363: Race Condition Enabling Link Following

Source file

pypi/filelock/CVE-2026-112938.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:43 +0000.