Tox-dev Filelock: Insufficient Verification of Data Authenticity (CVE-2026-112939)
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.22.0, < 4.2.1..*
- Tox-dev Filelock
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
4.7
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: Vendor (CNA), CVSS v3
4.7
CVSS v3
Severity Medium on the scale from 0 to 10.
Source: OSV, Hersteller, CVE.org
0.1 %
EPSS score
Low — model estimates < 1% exploitation likelihood.
Source: FIRST EPSS, percentile 3.3
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- 53.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- 4.7 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- 4.7
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.1 %
- 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- 3.3
- Low — this CVE sits in the lower 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-345
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
SoftFileLock, MarkerSoftFileLock, SoftFileLease, their async variants and a FileLock that has fallen back to a soft lock on ENOSYS decide from the record inside the marker file whether its owner is gone. The marker is the file whose presence says a process holds the lock. They do not check who could have written that record.
A local user who can write the marker but cannot remove it rewrites the holder's record to name a dead PID (process id). That position arises with an explicit mode with group or other write bits, or the default mode under a lax umask (the process setting that strips permission bits from new files), in a sticky or otherwise non-removable directory. The sticky bit is a directory flag that lets only a file's owner remove or rename it. The next contender running as the holder's account, or root, judges the lock stale, removes the live marker on that user's behalf and acquires it. Two processes then run the critical section together and neither gets an error. Affected versions are filelock 3.22.0 through 4.2.0 (finding ANT-2026-W1H9NXUH).
Severity
CVSS 3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N scores 4.7 (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:H (high attack complexity): the marker must carry group or other write bits (an explicit permissive mode, or umask 002/000 with a shared group), and a contender of the holder's account must ask for the lock while the forged record is in place. I:H (high integrity impact): two holders then write whatever the lock protects, and the holder is not told. C:N and A:N (no confidentiality or availability impact). S:U (scope unchanged). Classification from the review: security, conditional on another user being able to write the live marker. The scanner rated it high (CWE-345). The default mode under umask 022 is not affected.
Scope and preconditions
- The other user can write the marker. The application passes a
modewith group or other write bits, whichfchmodapplies as given since 4.1.0.0o666is a common choice for a lock shared between accounts, although a soft-lock contender of another account waits as well on a0o644marker, since contenders only read and rename. Or the application uses the default mode (0o666through the umask) under umask002in a directory whose group the other user belongs to, or under umask000. The default mode under umask022is not affected. - The other user cannot remove the marker itself: the directory is sticky, or the other user cannot write it at all (a
0755directory owned by the lock's user gives the same overlap). In a non-sticky shared directory the other user can unlink the marker without filelock, and filelock adds nothing. - A contender that may rename the marker asks for the lock: another process of the holder's account (several workers of one user) or root. A contender of another unprivileged account cannot rename the marker in a sticky directory and times out.
- The finding reaches every class that publishes a soft marker:
SoftFileLock,MarkerSoftFileLock,SoftFileLease, their async variants, andFileLock(mode=0o666)on a filesystem whereflock(a kernel lock on an open file) fails withENOSYS.
These protections against another local user hold only when no other user can replace the lock's directory or any of its ancestors. That holds when each ancestor belongs to the user or root and is either not writable by others or sticky. 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.
Affected code
At the scanned commit b831496: the create mode in SoftFileLock._acquire, the explicit-mode fchmod in _apply_explicit_mode, the trusting verdict in _try_break_stale_lock and the owner_is_stale it relies on; the same call in MarkerSoftFileLock and SoftFileLease.
Introduced
The stale verdict that trusts the record came in with e35c3afac473 ("feat(soft): detect and break stale locks", #476, 2026-02-13), first released in 3.22.0. From then on a marker left group- or other-writable by the umask is forgeable. The reproducer's exact configuration, an explicit mode=0o666 under umask 022, needs 66d309d ("fix(soft): honour mode and tighten marker grammar", #807), first released in 4.1.0. Both match the git tags.
Mechanism
A contender whose O_CREAT | O_EXCL create fails with EEXIST goes to _try_break_stale_lock. _read_lock_file makes sure the path is a regular file (lstat, O_NOFOLLOW open, fstat) and returns its content, mtime and inode (the kernel's identity for a file, independent of its name). It has the fstat result in hand but does not look at st_uid or st_mode. The code parses the content into pid, hostname and start token and hands them to owner_is_stale, whose docstring promises to return True "only when this process can prove the exact recorded owner is dead". That proof holds only if the owner wrote the record. A process of another account that can open the marker for writing uses O_WRONLY | O_TRUNC (no O_CREAT, so fs.protected_regular does not block it) and writes 2147483647\n<host>\n, keeping the host line. The host matches, PID 2147483647 does not exist, and owner_is_stale returns True.
break_lock_file renames the marker to <lock>.break.<pid>.<token> and unlinks it. Its mtime and inode guard compares against what the contender read after the rewrite, so it passes. The contender, which runs as the marker's owner, does the rename, so the sticky bit allows it. On the next poll the contender's O_EXCL create succeeds. The first holder is not told: SoftFileLock has no heartbeat, and on release _unlink_open_marker finds another inode or no file at the path and returns without an error.
Other records lead to the same break, each run by the scanner the same way: the holder's own PID and host with a different third line (owner_is_stale reads a live PID with another start token as a recycled PID); an empty file (malformed, broken after MALFORMED_LOCK_AGE_THRESHOLD, 2 s). MarkerSoftFileLock and SoftFileLease apply owner_is_stale to the pid=, host= and start= fields of a protocol 2 record, and rewriting pid= admitted a second process for both. A SoftFileLease holder learns of it at its next heartbeat through on_compromise; SoftFileLock and MarkerSoftFileLock holders do not learn of it at all.
The marker becomes writable by another account in two ways. An explicit mode with group or other write bits goes through fchmod, so the umask does not narrow it (test_lock_mode_soft at the scanned commit pins -rw-rw-rw- under umask 022). The default mode passes 0o666 to os.open, so under umask 002 the marker is 0o664. With no mode argument, in a setgid and sticky group directory (3770), a second member of the group rewrote the marker and a second process of the holder's user acquired the same way. Under umask 000 the marker is 0o666 and any local user can rewrite it. FileLock(mode=0o666) on a filesystem where flock fails with ENOSYS falls back to `SoftFile
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 versions | Fixed in | ||
|---|---|---|---|
| tox-dev | filelock |
|
|
| pip | filelock |
|
|
| pypi | filelock |
|
|
Vendors and products
Weakness classes (CWE)
CWE-345Insufficient Verification of Data Authenticity
Class
The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.
Entry at MITRE CWE-345
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.
| Reference tagged as exploit | github.com (opens in a new tab) | PoC (publicly reported)reported, not verified | — |
References & sources
- github.comtox-dev/filelock/commit/eeceaa846cbe4df72718d94c8371ca1ab8f5b3ccx_refsource_MISC, Patch, web
- github.comtox-dev/filelock/pull/836x_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-rfpc-qcw5-3pc4x_refsource_CONFIRM, Exploit, Mitigation, Patch, Vendor advisory, web
- NVD (NIST)vuln/detail/CVE-2026-112939advisory
- 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).
Initial analysis by NVDNVD
Newly listed as affected:- Tox-dev Filelock (3.22.0 – before 4.2.1)
Show 6 original changes
Individual changes of this event as published by NVD Type Action Before After Product configuration added —OR *cpe:2.3:a:tox-dev:filelock:*:*:*:*:*:python:*:* versions from (including) 3.22.0 up to (excluding) 4.2.1Reference type added —GitHub, Inc.: https://github.com/tox-dev/filelock/commit/eeceaa846cbe4df72718d94c8371ca1ab8f5b3cc Types: PatchReference type added —GitHub, Inc.: https://github.com/tox-dev/filelock/pull/836 Types: PatchReference type added —GitHub, Inc.: https://github.com/tox-dev/filelock/releases/tag/4.2.1 Types: Release NotesReference type added —CISA-ADP: https://github.com/tox-dev/filelock/security/advisories/GHSA-rfpc-qcw5-3pc4 Types: Exploit, Mitigation, Patch, Vendor AdvisoryReference type added —GitHub, Inc.: https://github.com/tox-dev/filelock/security/advisories/GHSA-rfpc-qcw5-3pc4 Types: Exploit, Mitigation, Patch, Vendor AdvisorySource identifier: nvd@nist.gov
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 Type Action Before After Reference added —https://github.com/tox-dev/filelock/security/advisories/GHSA-rfpc-qcw5-3pc4SSVC assessment added —{"id":"CVE-2026-112939","role":"CISA Coordinator","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"version":"2.0.3","timestamp":"2026-10-20T15:14:32.481979Z"}Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0
ReceivedGitHub
CVSS V3.1: AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
Weakness type: CWE-345
Description added or changed
Show 8 original changes
Individual changes of this event as published by NVD Type Action Before After Description added —filelock is a platform-independent file lock for Python. From 3.22.0 until 4.2.1, SoftFileLock can trust a forged process identifier in a marker that an attacker can modify but cannot remove, allowing an authorized contender such as another process of the holder's account or root to act as a confused deputy, remove the live marker, and admit another holder. This issue is fixed in version 4.2.1.CVSS added —AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:NWeakness type (CWE) added —CWE-345Affected versions (publisher) added —New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/112xxx/CVE-2026-112939.json">CVE-2026-112939</a>Reference added —https://github.com/tox-dev/filelock/commit/eeceaa846cbe4df72718d94c8371ca1ab8f5b3ccReference added —https://github.com/tox-dev/filelock/pull/836Reference added —https://github.com/tox-dev/filelock/releases/tag/4.2.1Reference added —https://github.com/tox-dev/filelock/security/advisories/GHSA-rfpc-qcw5-3pc4Source 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.
<a href="https://intel.neosec.eu/en/cve/CVE-2026-112939"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-112939.svg?lang=en" alt="CVE-2026-112939 – NEOSEC Intel" height="20"></a>