Skip to main content

Python 3.8 filelock with CVE-2025-68146 security patch (symlink attack prevention via O_NOFOLLOW)

Project description

Filelock LTS (py3.8) - 🛡️ PATCHED (Backport)

⚠️ Disclaimer: This project is not affiliated with, endorsed by, or associated with the official filelock maintainers. 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.16.1
Python Python 3.8
License Unlicense (Public Domain)

🛡️ Security Patch Overview

This release backports the complete upstream security fix for CVE-2025-68146 to Python 3.8.

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.8.

The Solution

This package is a drop-in replacement. It contains the original source code of filelock 3.16.1 but applies the specific security patches manually to both Unix and Windows drivers.

pip install filelock-lts-py3.8==2025.68146

⚙️ Technical Details

This release includes the full dual-platform fix:

Unix / Linux / macOS:

  • Enforces os.O_NOFOLLOW flag during lock file creation.
  • Prevents the kernel from following attacker-controlled symlinks.

Windows:

  • Implements explicit Reparse Point detection using kernel32.GetFileAttributesW via 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.16.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:

  1. 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.
  2. 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).
  3. Configurable Security Policies: Teams can choose how unpatched dependencies are handled based on their risk tolerance and operational needs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

filelock_lts_py38-2025.68146.2.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filelock_lts_py38-2025.68146.2-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file filelock_lts_py38-2025.68146.2.tar.gz.

File metadata

  • Download URL: filelock_lts_py38-2025.68146.2.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for filelock_lts_py38-2025.68146.2.tar.gz
Algorithm Hash digest
SHA256 60546fbf1247c5ec28f8b829d68a3deecc0a995533e78e286599bce7483dcd8d
MD5 17bc057d5da69254ed5b92b04dce99f2
BLAKE2b-256 00dc30542a1a372c26990dd22dca10329140191a4620349668fdd978712d4c1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for filelock_lts_py38-2025.68146.2.tar.gz:

Publisher: publish.yml on 1minds3t/filelock-lts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file filelock_lts_py38-2025.68146.2-py3-none-any.whl.

File metadata

File hashes

Hashes for filelock_lts_py38-2025.68146.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b5eb65d1b4c0156f265e657ba9b1a5eaa5bcb11d19dab8babcb8d8333b6329d
MD5 e54c24d32e6d62fbb22d25434d70fa39
BLAKE2b-256 e24ac5aa43751589d99306f86f52d01e86e133486776481e8317cd2be95305e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for filelock_lts_py38-2025.68146.2-py3-none-any.whl:

Publisher: publish.yml on 1minds3t/filelock-lts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page