CVE-2026-144405
FileLock on Unix lets two processes hold one lock after another user removes the lock file
- Severity
- 2.5LowLocal attack, low privileges, no user interactionCVSS 3.1, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- 0.17% in 30 daysPercentile6thEPSS, scored
- Listed fix
4.2.12for filelockFrom GitHub Advisories3 other affected packages
Overview
filelock is a platform-independent file lock for Python. From 3.13.2 until 4.2.12, on Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock. oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026. The affected native Unix lock is UnixFileLock, which FileLock selects where fcntl is available. Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here. This issue is fixed in version 4.2.12.
CVSS 3.1 vector
Exploitability
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
Impact
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:NExploit chance over time
Scored once so far, on . The trend appears after a second daily score.
Affected
Packages 4
| Package | Affected | Fixed |
|---|---|---|
filelockPyPI | 3.13.2 to 4.2.11 | 4.2.12 |
python-filelockDebian:12 | All versions, plus listed versions 3.12.2-13.12.3-13.12.4-13.13.1-13.13.3-1 Show 32 more versionsShow less3.13.4-13.14.0-13.15.4-13.16.1-13.16.1-23.17.0-13.18.0-13.19.1-13.20.0-13.20.2-13.20.3-13.24.3-13.25.0-13.25.2-13.29.0-13.29.4-13.29.5-13.29.7-13.32.0-13.32.2-13.32.4-13.32.4-23.32.5-13.32.6-13.9.0-13.9.0-1+deb12u14.0.1-14.0.12-14.1.1-14.2.10-14.2.8-14.3.1-1 | None listed |
python-filelockDebian:13 | All versions, plus listed versions 3.18.0-13.18.0-1+deb13u13.19.1-13.20.0-13.20.2-1 Show 20 more versionsShow less3.20.3-13.24.3-13.25.0-13.25.2-13.29.0-13.29.4-13.29.5-13.29.7-13.32.0-13.32.2-13.32.4-13.32.4-23.32.5-13.32.6-14.0.1-14.0.12-14.1.1-14.2.10-14.2.8-14.3.1-1 | None listed |
python-filelockDebian:14 | before 4.3.1-1, plus listed versions 3.18.0-13.19.1-13.20.0-13.20.2-13.20.3-1 Show 18 more versionsShow less3.24.3-13.25.0-13.25.2-13.29.0-13.29.4-13.29.5-13.29.7-13.32.0-13.32.2-13.32.4-13.32.4-23.32.5-13.32.6-14.0.1-14.0.12-14.1.1-14.2.10-14.2.8-1 | 4.3.1-1 |
Products 1
Sources
CVE List Score usedCVSS 3.12.5
FileLock on Unix lets two processes hold one lock after another user removes the lock file
filelock is a platform-independent file lock for Python. From 3.13.2 until 4.2.12, on Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock. oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026. The affected native Unix lock is UnixFileLock, which FileLock selects where fcntl is available. Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here. This issue is fixed in version 4.2.12.
- Record
CVE-2026-144405- CVSS 3.1
- 2.5 Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-667
- Updated
- 2026-12-04
EUVDEUVD-2026-143618CVSS 3.12.5
filelock is a platform-independent file lock for Python. From 3.13.2 until 4.2.12, on Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock. oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026. The affected native Unix lock is UnixFileLock, which FileLock selects where fcntl is available. Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here. This issue is fixed in version 4.2.12.
- Record
EUVD-2026-143618- CVSS 3.1
- 2.5 Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-12-03
GitHub AdvisoriesGHSA-386w-3w6q-9c53CVSS 3.12.5
FileLock on Unix lets two processes hold one lock after another user removes the lock file
Summary
On Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock.
oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026.
Affected area
Acquisition of the native Unix lock, UnixFileLock, which FileLock names where fcntl is available.
Attacker-controlled input
Another local account must be able to create the lock file before the victim does, in a sticky directory both can write, and must know or guess the lock path. It does not need access to the resource the lock protects, and it does not need to win a race: it removes the file at any time during a hold.
Affected code
In 4.2.11, _open_lock_file opens an existing file when the exclusive create fails, and _finalize_locked_fd records the hold after checking only that the file still has a link.
Mechanism
- The attacker creates the lock file with mode
0666in a sticky directory. - The victim's exclusive create fails with
EEXIST, or withEACCESwhere the kernel protects files in sticky directories (fs.protected_regular). Both paths reach_open_existing_lock_file, which opens the attacker's file withoutO_CREAT. #317 added theEACCESpath in 3.13.2. - The victim takes
flockon that file._finalize_locked_fdseesst_nlink == 1and records the hold. Nothing comparesst_uidwith the caller's user ID. - The attacker unlinks the file. The sticky bit lets a file's owner remove it (
unlink(2),EPERM). The victim'sflockstays on the unlinked inode. - A second process creates a new file at the path with
O_CREAT | O_EXCL, takesflockon the new inode and enters the protected section while the first is still in it.
Out of scope: a lock file the caller created, which other accounts cannot remove under a sticky directory; a directory without the sticky bit that other accounts can write, where any of them can remove any file (the directory boundary); Windows; the soft locks, which already refuse a coordination directory of another account.
Reproduction and evidence
Run on Linux 7.3.3 (Fedora 45) in a user namespace that maps three user IDs: 1001 as the attacker and 1002 for both victim processes. Each victim holds the lock for 4 seconds and waits at most 2 seconds for it.
Control, 4.2.11, the attacker leaves the file in place. The second process times out:
lock file: owner uid 1001, mode 666
directory: mode 1777
first entered 10:57:44
filelock._error.Timeout: The file lock '/mnt/shared/app.lock' could not be acquired.
second exit status: 1
first left 10:57:48
4.2.11 (commit 554c37b5), the attacker removes the file 1.5 seconds into the first hold. Both processes are inside from 10:47:01 to 10:47:04:
lock file: owner uid 1001, mode 666
directory: mode 1777
first entered 10:47:00
uid 1001 removed the lock file
second entered 10:47:01
first left 10:47:04
second left 10:47:05
second exit status: 0
3.13.1, the release before #317, refuses the file, so the first process never holds it:
PermissionError: [Errno…
- Record
GHSA-386w-3w6q-9c53- CVSS 3.1
- 2.5 Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-667
- Updated
- 2026-12-04
NVDCVSS 3.12.5
filelock is a platform-independent file lock for Python. From 3.13.2 until 4.2.12, on Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock. oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026. The affected native Unix lock is UnixFileLock, which FileLock selects where fcntl is available. Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here. This issue is fixed in version 4.2.12.
- Record
CVE-2026-144405- CVSS 3.1
- 2.5 Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-667
- Updated
- 2026-12-04
OSVCVSS 3.12.5
FileLock on Unix lets two processes hold one lock after another user removes the lock file
filelock is a platform-independent file lock for Python. From 3.13.2 until 4.2.12, on Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock. oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026. The affected native Unix lock is UnixFileLock, which FileLock selects where fcntl is available. Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here. This issue is fixed in version 4.2.12.
- Record
CVE-2026-144405- CVSS 3.1
- 2.5 Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-667
- Updated
- 2026-12-04
OSVDEBIAN-CVE-2026-144405CVSS 3.12.5
filelock is a platform-independent file lock for Python. From 3.13.2 until 4.2.12, on Unix, FileLock locks a regular file that already exists at the lock path, including one another local account created. Under a sticky directory such as /tmp that account owns the file and may remove it while a process holds the lock. The next process to acquire the lock creates and locks a new file at the same path, so two processes hold the same exclusive lock. oss-security-shopify reported this through private vulnerability reporting as GHSA-386w-3w6q-9c53, received on 17 November 2026. The affected native Unix lock is UnixFileLock, which FileLock selects where fcntl is available. Two cooperating processes run the protected section at the same time, so whatever the application guards with the lock can be written twice or left inconsistent. The attacker gains no access to that resource and no code execution. What the overlap costs depends on the application and is not established here. This issue is fixed in version 4.2.12.
- Record
DEBIAN-CVE-2026-144405- CVSS 3.1
- 2.5 Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-12-04
The JSON record also has the rest of 1 source description.
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Affected packages, references | 4 sourcesShow lessCVE List, GitHub Advisories, NVD, OSV | |
| Affected packages, other IDs, key facts, references | OSV | |
| Other IDs, references | OSV | |
| Other IDs, published date | EUVD, NVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/tox-dev/filelock/security/advisories/GHSA-386w-3w6q-9c53
github.com/tox-dev/filelock/pull/968
github.com/tox-dev/filelock/commit/571eb998ea65c1cdd54157c70e4c592e6ac3cd04
github.com/tox-dev/filelock/releases/tag/4.2.12
nvd.nist.gov/vuln/detail/CVE-2026-144405
github.com/advisories/GHSA-386w-3w6q-9c53
github.com/CVEProject/cvelistV5/tree/main/cves/2026/144xxx/CVE-2026-144405.json
security-tracker.debian.org/tracker/CVE-2026-144405