# CVE-2026-22701: python-filelock: filelock is a platform-independent file lock for Python

CVE-2026-22701 is fixed in 4 products on 1 platform, first by python-filelock 3.0.4-1ubuntu0.1~esm1, released January 9, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-22701
- Priority: Routine
- CVSS: 5.3 (medium)
- EPSS: 0.0013
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jan 9, 2026

## Description

filelock is a platform-independent file lock for Python. Prior to version 3.20.3, a TOCTOU race condition vulnerability exists in the SoftFileLock implementation of the filelock package. An attacker with local filesystem access and permission to create symlinks can exploit a race condition between the permission validation and file creation to cause lock operations to fail or behave unexpectedly. The vulnerability occurs in the _acquire() method between raise_on_not_writable_file() (permission check) and os.open() (file creation). During this race window, an attacker can create a symlink at the lock file path, potentially causing the lock to operate on an unintended target file or leading to denial of service. This issue has been patched in version 3.20.3.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | python-filelock Debian 12.15 (bookworm) | 3.9.0-1+deb12u1 | [DEBIAN-CVE-2026-22701](https://patchblox.com/security/data/fix/linux/debian-cve-2026-22701.md) | Jan 10, 2026 |
| Linux | python-filelock Debian 14 | 3.20.3-1 | [DEBIAN-CVE-2026-22701](https://patchblox.com/security/data/fix/linux/debian-cve-2026-22701.md) | Jan 10, 2026 |
| Linux | python-filelock Ubuntu 18.04.6 LTS (bionic) | 3.0.4-1ubuntu0.1~esm1 | [python-filelock 3.0.4-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python-filelock-3.0.4-1ubuntu0.1-esm1.md) | Jan 9, 2026 |
| Linux | python-filelock opensuse-leap 15.6 | 3.12.2-150400.10.8.1 | [SUSE-SU-2026:0220-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-0220-1.md) | Jan 22, 2026 |
| Linux | python-filelock opensuse-leap 16.0 | 3.18.0-160000.3.1 | [OPENSUSE-SU-2026:20144-1](https://patchblox.com/security/data/fix/linux/opensuse-su-2026-20144-1.md) | Jan 30, 2026 |
| Linux | python-filelock sles 15.7 | 3.0.12-150100.3.9.1 | [SUSE-SU-2026:0335-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-0335-1.md) | Jan 29, 2026 |
| Linux | python-filelock sles 15.7 | 3.12.2-150400.10.8.1 | [SUSE-SU-2026:0220-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-0220-1.md) | Jan 22, 2026 |
| Linux | python-filelock sles 16.0 | 3.18.0-160000.3.1 | [SUSE-SU-2026:20216-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-20216-1.md) | Jan 30, 2026 |
| Linux | python-filelock-doc amzn 2023 | 3.3.1-1.amzn2023.0.2 | [ALAS2023-2026-1415](https://patchblox.com/security/data/fix/linux/alas2023-2026-1415.md) | Feb 5, 2026 |
| Linux | python3-filelock Ubuntu 18.04.6 LTS (bionic) | 3.0.4-1ubuntu0.1~esm1 | [python3-filelock 3.0.4-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3-filelock-3.0.4-1ubuntu0.1-esm1.md) | Jan 9, 2026 |
| Linux | python3-filelock Ubuntu 22.04.1 LTS (jammy) | 3.6.0-1ubuntu0.1~esm1 | [python3-filelock 3.6.0-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-python3-filelock-3.6.0-1ubuntu0.1-esm1.md) | Jan 9, 2026 |
| Linux | python3-filelock Ubuntu 24.04.5 LTS (noble) | 3.13.1-1ubuntu0.1~esm1 | [python3-filelock 3.13.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-noble-python3-filelock-3.13.1-1ubuntu0.1-esm1.md) | Jan 9, 2026 |
| Linux | python3-filelock amzn 2023 | 3.3.1-1.amzn2023.0.2 | [ALAS2023-2026-1415](https://patchblox.com/security/data/fix/linux/alas2023-2026-1415.md) | Feb 5, 2026 |
| Linux | python3.13-filelock amzn 2023 | 3.18.0-1.amzn2023.0.1 | [ALAS2023-2026-1411](https://patchblox.com/security/data/fix/linux/alas2023-2026-1411.md) | Feb 16, 2026 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
