CVE-2026-112935: filelock: SoftFileLock stale-lock break removes a live lock file on a reused inode number and admits two holders
The stale-lock break shared by SoftFileLock, MarkerSoftFileLock and SoftFileLease (and their async variants, and a FileLock that has fallen back to a soft lock on ENOSYS, the “not implemented” error) recognises the marker it judged stale by two values. The marker is the lock file at <path>, whose presence says a process holds the lock. The values are its inode number (the kernel’s identity for a file, independent of its name) and its modification time (mtime) not being newer. The check runs after the contender has already closed the marker, so nothing keeps the inode allocated.
On a filesystem that hands a freed inode number straight to the next file (ext4, xfs, overlayfs on them) the next holder’s marker can carry that number. A contender still between its read and its break then renames and unlinks the live marker. Another local user (the other user below) who can create files in the lock’s directory, a sticky /tmp included (the sticky bit is a directory flag that lets only a file’s owner remove it), forces this at will. It plants a marker with a stale owner record and a modification time in the future and unlinks it as soon as a contender has read it. Two processes of the user running the lock (the lock user below) then hold the same default-configured lock at once, and nothing raises or logs. Affected versions: filelock >= 3.22.0 and <= 4.2.0 (finding ANT-2026-KIIS96IX).
References
- github.com/advisories/GHSA-fq56-3cx3-fjxp
- github.com/tox-dev/filelock/commit/740ff666b62a88496c8d7394e4e6230605e4d62b
- github.com/tox-dev/filelock/pull/843
- github.com/tox-dev/filelock/releases/tag/4.2.1
- github.com/tox-dev/filelock/security/advisories/GHSA-fq56-3cx3-fjxp
- nvd.nist.gov/vuln/detail/CVE-2026-112935
Code Behaviors & Features
Detect and mitigate CVE-2026-112935 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 →