Skip to main content

filelock EUVDEUVD-2026-105029

| CVE-2026-112939 MEDIUM
Insufficient Verification of Data Authenticity (CWE-345)
2026-10-20 GitHub_M
4.7
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local account able to write the shared marker
  2. Delivery
    Rewrite SoftFileLock marker with forged PID
  3. Exploit
    Exploit boot-id or time-namespace ambiguity
  4. Execution
    Stale check deems live holder dead
  5. Impact
    Remove marker and admit competing holder

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Data authenticity verification
Exploitation Conditions

Requires local access from an account that can modify or rename the soft lock marker file - the holder's own account or root - because pre-4.2.1 markers carried group/other write bits; only SoftFileLock, MarkerSoftFileLock, and SoftFileLease are affected, not the default OS-level FileLock. Realistic exploitation further depends on specific Linux conditions enumerated in the fix: holder and contender running in time namespaces with different boottime offsets (Linux 5.6+), one side unable to read /proc/sys/kernel/random/boot_id (e.g. systemd ProcSubset=pid), or an attacker directly rewriting the marker. Limiting factors: local-only access (no remote vector), need for a writable shared marker, high attack complexity, and dependence on these non-default namespace/boot-id configurations.

Impact

This is a genuine but narrowly-scoped, lower-priority issue rather than a drop-everything emergency. The provided CVSS:3.1 vector (AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N, base 4.7 Medium) is internally consistent with the description: exploitation is local (AV:L), requires an account on the host able to modify the marker (PR:L - an authorized contender such as another process of the holder's account or root), and is high-complexity (AC:H) because it depends on specific Linux conditions (time namespaces with differing boottime offsets, or inability to read the boot id, or actively rewriting the marker). Impact is integrity-only (C:N/I:H/A:N) - the attacker breaks mutual exclusion by evicting a live holder and admitting another, not reading data. No EPSS score, KEV listing, POC, or SSVC decision was provided in the input, so exploitation-probability signals are simply ABSENT (not low - unmeasured). There are no conflicting signals among the sources; the main data gap is the lack of any exploitation-likelihood metric. Net: a local, authenticated, high-complexity confused-deputy flaw with integrity-only consequences - real for shared-account/multi-tenant hosts and CI, but not broadly or remotely exploitable.

Exploit ScenarioDerived

On a host where multiple processes share an account (or where root participates) and use filelock's SoftFileLock, an attacker-controlled process rewrites the lock marker - which before the fix carried group/other write bits - to carry a forged process identifier. A contending process's stale check then trusts the forged PID (aided by a boot-id or time-namespace gap), concludes the live holder is dead, removes its marker, and admits a competing holder, breaking the lock and risking concurrent access or data corruption. No public exploit code was identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 20, 2026

SoftFileLock, MarkerSoftFileLock, and SoftFileLease in the Python filelock package from 3.22.0 through 4.2.0 can be tricked into deleting a live holder's marker file, because the stale-owner check trusts a process identifier and start token stored in a marker that an attacker with write access to the same directory can rewrite but not remove (CWE-345). An authorized local contender - another process running under the holder's account, or root - can therefore act as a confused deputy, drop the live marker, and admit a second holder into a lock that should have stayed exclusive, undermining mutual exclusion for whatever resource the lock guards. The CVSS 3.1 vector scores this 4.7 (AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N), reflecting local-only access, high attack complexity, and integrity-only impact; no public exploit code and no confirmed active exploitation were identified at time of analysis, and the upstream advisory, PR #836, and commit eeceaa84 accompany the fixed release 4.2.1. Exploitation is further gated on non-default conditions - mismatched Linux time-namespace boottime offsets, an unreadable boot_id on one side, or direct marker rewriting - making this a genuine but narrowly scoped, lower-priority issue rather than a drop-everything emergency.

RemediationAI

Vendor-released patch: upgrade filelock to 4.2.1 or later, which strips group and other write bits from soft markers and hardens the stale check (the _same_start() boot-id comparison, the initial time-namespace detection, and the carriage-return-safe process-name parsing). Pin the fixed release in your dependency manifest and confirm with pip show filelock or a lockfile audit; the advisory at https://github.com/tox-dev/filelock/security/advisories/GHSA-rfpc-qcw5-3pc4 and release notes at https://github.com/tox-dev/filelock/releases/tag/4.2.1 document the change. If upgrading is not immediately possible, use the default OS-level FileLock instead of SoftFileLock, MarkerSoftFileLock, or SoftFileLease - the trade-off is that it depends on fcntl or msvcrt semantics and is less portable across exotic filesystems and network shares. Alternatively, place soft lock files in a directory writable only by the owning account (mode 0700, no group/other write), since the confused-deputy path requires a marker another process can rewrite; the trade-off is that genuinely shared lock directories across accounts or containers stop working. Avoid running holders and contenders in Linux time namespaces with differing boottime offsets, and ensure /proc/sys/kernel/random/boot_id is readable inside any systemd unit using ProcSubset=pid, since both conditions degrade the start token to a PID-only comparison; these are configuration changes rather than code changes and require validating container runtime and systemd unit settings. No vendor-released patch is needed for versions outside 3.22.0 through 4.2.0, but audit whether you depend on soft locks at all before relying on the default backend.

Affected VersionsENISA

filelock 3.22.0, < 4.2.1

Affected Packages

euvd filelock fix: 4.2.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

filelock is a platform-independent advisory locking library for Python. Its soft-lock backends (SoftFileLock, and the newer MarkerSoftFileLock and SoftFileLease) emulate locking in pure Python by writing a marker file that records the owning process's identity, rather than delegating to kernel primitives as the default FileLock does. Staleness decisions rest on that record: the library reads /proc/<pid>/stat starttime folded together with /proc/sys/kernel/random/boot_id into a single integer token, and treats the marker as stale when the PID is dead or the start token no longer matches. CWE-345 (Insufficient Verification of Data Authenticity) is the root cause - the marker is an untrusted, attacker-writable artifact, yet its contents were used to authorize deletion of the live lock. Pre-4.2.1 soft markers also inherited group and other write bits, so any process with directory access could rewrite the marker (optionally keeping the same inode) and supply a forged PID or token that the stale check accepted. Three specific failure modes are addressed in the fix: Linux 5.6+ time namespaces apply the reader's boottime offset to starttime, so a holder in such a namespace records no start token and falls back to PID alone, which a recycled PID can satisfy; a process unable to read boot_id (for example under systemd's ProcSubset=pid) records a token with a zero high 64 bits, so contenders now compare only the low 64 bits via the new _same_start() helper; and process names containing carriage returns or other line separators previously raised ValueError in the stale check. The patch also detects the initial time namespace by its fixed inode (0xEFFFFFFA) and stops comparing start times at all - failing closed and keeping the marker - when /proc/self/ns/time exists but cannot be read.

Know when Filelock gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 4.7 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
vuln.today AI 4.7 MEDIUM

Local marker manipulation needs an account able to write the shared marker (PR:L) and specific Linux namespace/boot-id conditions (AV:L, AC:H); impact is lock-integrity only, so C:N/I:H/A:N.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
4.0 AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Oct 20, 2026 - 16:02 EUVD
CVE Published
Oct 20, 2026 - 14:38 cve.org
MEDIUM 4.7

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
High
widely-used Python file-locking library, common transitive dependency
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0
CVE-2026-112940 HIGH
7.1 Oct 20

filelock's SQLite-backed ReadWriteLock (versions 3.20.4 through 4.2.0) can be tricked into overwriting or unlinking the

CVE-2026-112911 MEDIUM
6.3 Oct 20

The Python `filelock` package's opt-in `StrictSoftFileLock` (3.30.0 through <4.2.1) and `SoftReadWriteLock` (4.0.0 throu

CVE-2026-112936 MEDIUM
6.1 Oct 20

Symlink redirection in filelock's ReadWriteLock and AsyncReadWriteLock (versions 3.20.4 through 4.0.8) allows a local us

CVE-2026-112934 MEDIUM
6.1 Oct 20

SoftReadWriteLock in the Python filelock package (4.0.0 through 4.2.0) refreshes holder records by pathname without veri

CVE-2026-112909 MEDIUM
6.1 Oct 20

Python filelock's UnixFileLock truncates a regular file that a second local user has renamed onto the lock path (or hard

CVE-2026-112937 MEDIUM
6.1 Oct 20

A time-of-check-to-time-of-use (TOCTOU) flaw in the Python filelock library's ReadWriteLock, present from 4.1.0 through

CVE-2026-112915 MEDIUM
5.5 Oct 20

Local denial of service in the Python `filelock` package (versions 3.20.4 through 4.2.0) allows a second local account t

CVE-2026-112914 MEDIUM
5.3 Oct 20

A local, low-privileged user (PR:L) who can rename files in a shared, non-sticky-bit lock directory can abuse the Python

CVE-2026-22701 MEDIUM
5.3 Jan 10

Python's filelock SoftFileLock implementation prior to version 3.20.3 contains a TOCTOU race condition that allows local

CVE-2026-112935 MEDIUM
4.7 Oct 20

The Python filelock library (versions 3.22.0 through 4.2.0) can admit two simultaneous lock holders because its SoftFile

CVE-2026-112906 MEDIUM
4.7 Oct 20

Python's filelock library, versions 4.1.0 through 4.2.0, allows a local attacker who is already contending on the same l

CVE-2026-112941 LOW
3.3 Oct 20

Symlink or junction replacement of the `<path>.rw` lock tree in Python's filelock 4.1.0 through 4.2.0 lets a second, co-

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy