Python 3.9 compatible filelock with CVE-2025-68146 patch
Project description
Filelock LTS (py3.9) - 🛡️ PATCHED (Backport)
⚠️ Disclaimer: This project is not affiliated with, endorsed by, or associated with the official
filelockmaintainers. All patches and releases are independently maintained and provided on a best-effort basis to support legacy environments.
| Metric | Details |
|---|---|
| CVE | CVE-2025-68146 |
| Version | 2025.68146 |
| Base Core | filelock 3.19.1 |
| Python | Python 3.9 |
| License | Unlicense (Public Domain) |
🛡️ Security Patch Overview
This release backports the complete upstream security fix for CVE-2025-68146 to Python 3.9.
While upstream filelock patched this issue in versions requiring Python 3.10+, millions of installations on older Python versions remain vulnerable. This package restores full security parity for legacy environments.
The Problem
- Vulnerability: CVE-2025-68146 (Symlink/Junction TOCTOU Attack)
- Impact: Local attackers can truncate or corrupt arbitrary files via race conditions involving symlinks (Linux/Unix) or Junctions (Windows).
- Context: Official upstream patches are not available for Python 3.9.
The Solution
This package is a drop-in replacement. It contains the original source code of filelock 3.19.1 but applies the specific security patches manually to both Unix and Windows drivers.
pip install filelock-lts-py3.9==2025.68146
⚙️ Technical Details
This release includes the full dual-platform fix:
Unix / Linux / macOS:
- Enforces
os.O_NOFOLLOWflag during lock file creation. - Prevents the kernel from following attacker-controlled symlinks.
Windows:
- Implements explicit Reparse Point detection using
kernel32.GetFileAttributesWvia ctypes. - Refuses to acquire locks if the target is a Symbolic Link or Directory Junction.
- Mitigates specific Windows-based TOCTOU attacks.
Verification: You can compare the source tree of this branch against the official filelock 3.19.1 tag. The changes are strictly limited to _unix.py and _windows.py security logic.
🔮 The Future: Proactive Dependency Security
The Filelock LTS ecosystem is evolving to provide earlier visibility and stronger controls around dependency risk:
- Early Warning Releases: Placeholder LTS releases may be published when a potential upstream security issue is under investigation, allowing users to prepare before official advisories are issued.
- Runtime Policy Enforcement (Optional): An opt-in runtime module that detects vulnerable dependency versions at runtime and enforces user-configured policies (warn, block, or isolate).
- Configurable Security Policies: Teams can choose how unpatched dependencies are handled based on their risk tolerance and operational needs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file filelock_lts_py39-2025.68146.2.tar.gz.
File metadata
- Download URL: filelock_lts_py39-2025.68146.2.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
661d83b8e49aa9552ea7c45aafbb4345ac749634fe8fb687b4c83edb194cb649
|
|
| MD5 |
ff13f0ee9705a429eddbc762681841c0
|
|
| BLAKE2b-256 |
f28572a2c03e769cb254003e936afe69d03b7e04c016d349cbd7bc7ea543658e
|
Provenance
The following attestation bundles were made for filelock_lts_py39-2025.68146.2.tar.gz:
Publisher:
publish.yml on 1minds3t/filelock-lts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
filelock_lts_py39-2025.68146.2.tar.gz -
Subject digest:
661d83b8e49aa9552ea7c45aafbb4345ac749634fe8fb687b4c83edb194cb649 - Sigstore transparency entry: 779624673
- Sigstore integration time:
-
Permalink:
1minds3t/filelock-lts@1dfd6ac63cfe30bf3e6ad52cff5b39070afc8a33 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/1minds3t
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1dfd6ac63cfe30bf3e6ad52cff5b39070afc8a33 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file filelock_lts_py39-2025.68146.2-py3-none-any.whl.
File metadata
- Download URL: filelock_lts_py39-2025.68146.2-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bc9e3d13d7ccbff94a90d7550249eca68f29c441ee26bb21be4f79972719fd6
|
|
| MD5 |
a1f1711216d3e3f033e914ede032fbf9
|
|
| BLAKE2b-256 |
3dbb0392eb35ca284a826aaaf175efa9c200a31daa1686212e5085d41f027617
|
Provenance
The following attestation bundles were made for filelock_lts_py39-2025.68146.2-py3-none-any.whl:
Publisher:
publish.yml on 1minds3t/filelock-lts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
filelock_lts_py39-2025.68146.2-py3-none-any.whl -
Subject digest:
1bc9e3d13d7ccbff94a90d7550249eca68f29c441ee26bb21be4f79972719fd6 - Sigstore transparency entry: 779624674
- Sigstore integration time:
-
Permalink:
1minds3t/filelock-lts@1dfd6ac63cfe30bf3e6ad52cff5b39070afc8a33 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/1minds3t
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1dfd6ac63cfe30bf3e6ad52cff5b39070afc8a33 -
Trigger Event:
workflow_dispatch
-
Statement type: