CVE-2026-112940
Received Received - Intake

Filelock ReadWriteLock Symlink Race Condition in Python

Vulnerability report for CVE-2026-112940, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-20

Last updated on: 2026-10-20

Assigner: GitHub, Inc.

Description

filelock is a platform-independent file lock for Python. From 3.20.4 until 4.2.1, ReadWriteLock let SQLite reopen the database and side files by name; on POSIX systems an attacker with rename access in a non-sticky parent can swap those names to cause overwrite or unlink operations, while a writable adjacent hot journal is additionally required for attacker-chosen content overwrites. This issue is fixed in version 4.2.1.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-20
Last Modified
2026-10-20
Generated
2026-10-20
AI Q&A
2026-10-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
tox-dev filelock >= 3.20.4, < 4.2.1

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-363 The product checks the status of a file or directory before accessing it, which produces a race condition in which the file can be replaced with a link before the access is performed, causing the product to access the wrong file.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the filelock library versions 3.20.4 to 4.2.0. It involves the ReadWriteLock and AsyncReadWriteLock components which use SQLite for locking. The issue occurs because SQLite reopens the lock database by name instead of file descriptor, allowing attackers with local access to manipulate symlinks or create malicious journal files. This can lead to file overwrites, unlinks, permission changes, or denial-of-service conditions.

Detection Guidance

Check if your system uses filelock versions 3.20.4 to 4.2.0 by running: pip show filelock. If installed, verify the version matches the vulnerable range. Inspect directories with lock files for unexpected symlinks or journal files like -wal, -journal, or -shm. Use commands like ls -la /tmp or find / -type l to detect suspicious symlinks.

Impact Analysis

If exploited, this vulnerability could allow an attacker to overwrite or delete your files, change file permissions, or cause your applications to crash. It requires the attacker to have local access to a directory where the lock database is stored, such as a non-sticky or group-writable directory.

Compliance Impact

This vulnerability could lead to unauthorized file modifications or deletions, potentially violating data integrity and availability requirements in GDPR and HIPAA. Unauthorized access or data loss may result in non-compliance with these regulations, leading to legal and financial penalties.

Mitigation Strategies

Upgrade filelock to version 4.2.1 or later using pip install --upgrade filelock. Ensure directories containing lock files are sticky (e.g., chmod +t /tmp) or restrict write permissions to prevent unauthorized access. Avoid using non-sticky shared directories for lock files.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-112940. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart