CVE-2026-112911
filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, StrictSoftFileLock versions from 3.30.0 and SoftReadWriteLock versions from 4.0.0 can adopt a protocol directory created first by another local user in a shared parent directory, allowing that user to alter protocol state and admit concurrent holders. This issue is fixed in version 4.2.1.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.3
filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, StrictSoftFileLock versions from 3.30.0 and SoftReadWriteLock versions from 4.0.0 can adopt a protocol directory created first by another local user in a shared parent directory, allowing that user to alter protocol state and admit concurrent holders. This issue is fixed in version 4.2.1.
- Record
CVE-2026-112911- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-283
- Updated
- 2026-11-02
EUVDEUVD-2026-105018
6.3
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, StrictSoftFileLock versions from 3.30.0 and SoftReadWriteLock versions from 4.0.0 can adopt a protocol directory created first by another local user in a shared parent directory, allowing that user to alter protocol state and admit concurrent holders. This issue is fixed in version 4.2.1.
- Record
EUVD-2026-105018- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-9c4x-gm8v-wgc4
6.3
filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion
StrictSoftFileLock, AsyncStrictSoftFileLock, SoftReadWriteLock and AsyncSoftReadWriteLock keep their whole ownership state as files in a directory derived from the lock path (<path>.filelock/claims, <path>.rw/{gen,holders}). When that directory already exists they adopt it after checking only that it is a real directory, not who owns it. Another local user who can create names in the lock's directory can create the tree before the first acquire on that path by the user running the lock (below: the lock user). In /tmp, /var/tmp or another sticky shared directory any user can do that; the sticky bit is a directory flag that lets only a file's owner remove or rename it. The other user then owns the tree. They can unlink the lock user's claims while the lock user holds the lock, so a second process of the lock user, root included, enters the same critical section and neither process sees an error.
Against SoftReadWriteLock the same position also admits two writers with on_compromise silent. It redirects the lock user's own creates and renames into a directory the other user picks (the scanner replaced a repository's .git/HEAD with a filelock record written with the lock user's privileges). It also keeps the lock user's acquire or release running past any timeout. Affected versions are filelock 3.30.0 through 4.2.0 (finding ANT-2026-Q5VK5JEE).
Severity
CVSS 3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H scores 6.3 (Medium). AV:L (local): the other user needs an account on the same host. PR:L (low privileges): an ordinary account is enough. UI:N (no user interaction). AC:H (high attack complexity): the other user must create the protocol directory before the lock user's first acquire on that path. That depends on the path being new, or on a reboot, a tmp cleaner or the documented <path>.rw recovery having removed its tree; once planted, the rest needs no race. I:H (high integrity impact): two holders write whatever the lock protects, and for SoftReadWriteLock the lock user's process creates, replaces or deletes files named HEAD, epoch and 0000000000000000000N in any directory the lock user can write. A:H (high availability impact): the owner of <path>.rw can make the lock user's read_lock(timeout=1) spin at full CPU without end, cost 22 s per acquire, or pin 1 MiB of memory per planted file until a heartbeat thread dies of MemoryError. C:N (no confidentiality impact). S:U (scope unchanged).
Classification from the review: security, conditional on the other user winning initial ownership of the protocol directory. The scanner rated it high (CWE-283). With AC:L the same impacts would score 7.1.
Scope and preconditions
- The other user can create names in the directory that holds the lock. In a sticky
1777directory such as/tmpany local user can. The sticky bit stops that user from renaming or removing a directory the lock user created, but does nothing for one the other user created first. - The other user gets there first:
<path>.filelock(strict) or<path>.rw(soft read-write) must not exist when the lock user's process first acquires._strict.pydoes not remove the directory at any point, so a path the lock user has already used stays safe for as long as the tree exists. The exposure is a new lock path, or one whose tree a reboot, a tmp cleaner, a cache purge or the recovery described indocs/how-to.rstremoved. - For the strict lock the planted directory must be writable by the lock user (
0777); a planted0755directory makes the lock user's acquire fail withPermissionErrorinstead. Planting only the outer<path>.filelockis enough. The lock user createsclaimsinside it, and the other user, as owner of the parent, renames thatclaimsaside and creates an empty one. - The Linux
fs.protected_regular,fs.protected_symlinks,fs.protected_hardlinksandfs.protected_fifossysctls (kernel settings, all enabled in the…
- Record
GHSA-9c4x-gm8v-wgc4- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-283
- Updated
- 2026-11-02
NVD
6.3
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, StrictSoftFileLock versions from 3.30.0 and SoftReadWriteLock versions from 4.0.0 can adopt a protocol directory created first by another local user in a shared parent directory, allowing that user to alter protocol state and admit concurrent holders. This issue is fixed in version 4.2.1.
- Record
CVE-2026-112911- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-283
- Updated
- 2026-11-02
OSV
6.3
filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, StrictSoftFileLock versions from 3.30.0 and SoftReadWriteLock versions from 4.0.0 can adopt a protocol directory created first by another local user in a shared parent directory, allowing that user to alter protocol state and admit concurrent holders. This issue is fixed in version 4.2.1.
- Record
CVE-2026-112911- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-283
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-112911
6.3
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, StrictSoftFileLock versions from 3.30.0 and SoftReadWriteLock versions from 4.0.0 can adopt a protocol directory created first by another local user in a shared parent directory, allowing that user to alter protocol state and admit concurrent holders. This issue is fixed in version 4.2.1.
- Record
DEBIAN-CVE-2026-112911- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-9c4x-gm8v-wgc4
6.3
filelock: StrictSoftFileLock and SoftReadWriteLock adopt a protocol directory another user created first, losing mutual exclusion
StrictSoftFileLock, AsyncStrictSoftFileLock, SoftReadWriteLock and AsyncSoftReadWriteLock keep their whole ownership state as files in a directory derived from the lock path (<path>.filelock/claims, <path>.rw/{gen,holders}). When that directory already exists they adopt it after checking only that it is a real directory, not who owns it. Another local user who can create names in the lock's directory can create the tree before the first acquire on that path by the user running the lock (below: the lock user). In /tmp, /var/tmp or another sticky shared directory any user can do that; the sticky bit is a directory flag that lets only a file's owner remove or rename it. The other user then owns the tree. They can unlink the lock user's claims while the lock user holds the lock, so a second process of the lock user, root included, enters the same critical section and neither process sees an error.
Against SoftReadWriteLock the same position also admits two writers with on_compromise silent. It redirects the lock user's own creates and renames into a directory the other user picks (the scanner replaced a repository's .git/HEAD with a filelock record written with the lock user's privileges). It also keeps the lock user's acquire or release running past any timeout. Affected versions are filelock 3.30.0 through 4.2.0 (finding ANT-2026-Q5VK5JEE).
Severity
CVSS 3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H scores 6.3 (Medium). AV:L (local): the other user needs an account on the same host. PR:L (low privileges): an ordinary account is enough. UI:N (no user interaction). AC:H (high attack complexity): the other user must create the protocol directory before the lock user's first acquire on that path. That depends on the path being new, or on a reboot, a tmp cleaner or the documented <path>.rw recovery having removed its tree; once planted, the rest needs no race. I:H (high integrity impact): two holders write whatever the lock protects, and for SoftReadWriteLock the lock user's process creates, replaces or deletes files named HEAD, epoch and 0000000000000000000N in any directory the lock user can write. A:H (high availability impact): the owner of <path>.rw can make the lock user's read_lock(timeout=1) spin at full CPU without end, cost 22 s per acquire, or pin 1 MiB of memory per planted file until a heartbeat thread dies of MemoryError. C:N (no confidentiality impact). S:U (scope unchanged).
Classification from the review: security, conditional on the other user winning initial ownership of the protocol directory. The scanner rated it high (CWE-283). With AC:L the same impacts would score 7.1.
Scope and preconditions
- The other user can create names in the directory that holds the lock. In a sticky
1777directory such as/tmpany local user can. The sticky bit stops that user from renaming or removing a directory the lock user created, but does nothing for one the other user created first. - The other user gets there first:
<path>.filelock(strict) or<path>.rw(soft read-write) must not exist when the lock user's process first acquires._strict.pydoes not remove the directory at any point, so a path the lock user has already used stays safe for as long as the tree exists. The exposure is a new lock path, or one whose tree a reboot, a tmp cleaner, a cache purge or the recovery described indocs/how-to.rstremoved. - For the strict lock the planted directory must be writable by the lock user (
0777); a planted0755directory makes the lock user's acquire fail withPermissionErrorinstead. Planting only the outer<path>.filelockis enough. The lock user createsclaimsinside it, and the other user, as owner of the parent, renames thatclaimsaside and creates an empty one. - The Linux
fs.protected_regular,fs.protected_symlinks,fs.protected_hardlinksandfs.protected_fifossysctls (kernel settings, all enabled in the…
- Record
GHSA-9c4x-gm8v-wgc4- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-283
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-112911
6.3
filelock is a platform-independent file lock for Python. From 3.30.0 until 4.2.1, StrictSoftFileLock versions from 3.30.0 and SoftReadWriteLock versions from 4.0.0 can adopt a protocol directory created first by another local user in a shared parent directory, allowing that user to alter protocol state and admit concurrent holders. This issue is fixed in version 4.2.1.
- Record
UBUNTU-CVE-2026-112911- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
filelockPyPI |
3.30.0 to 4.2.0 | 4.2.1 |
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 29 moreShow 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-1 |
None known |
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 17 moreShow 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-1 |
None known |
python-filelockDebian:14 |
All versions, plus listed versions 3.18.0-13.19.1-13.20.0-13.20.2-13.20.3-1 Show 16 moreShow 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-1 |
None known |
filelockPyPI |
3.30.0 up to 4.2.1, plus listed versions 3.30.13.30.23.30.33.31.03.31.1 Show 25 moreShow less3.31.23.32.03.32.23.32.33.32.43.32.53.32.63.32.74.0.04.0.14.0.104.0.114.0.124.0.24.0.34.0.44.0.54.0.64.0.74.0.84.0.94.1.04.1.14.1.24.2.0 |
4.2.1 |
python-filelockUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 2.0.11-12.0.12-12.0.13-13.0.0-23.0.3-13.0.4-13.0.4-1ubuntu0.1~esm1 |
None known |
python-filelockUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 3.0.12-13.0.12-23.0.12-2ubuntu0.1~esm1 |
None known |
python-filelockUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 3.0.12-23.3.2-13.4.0-13.4.2-13.4.2-23.6.0-13.6.0-1ubuntu0.1~esm1 |
None known |
python-filelockUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 3.12.2-13.12.4-13.13.1-13.13.1-1ubuntu0.1~esm1 |
None known |
python-filelockUbuntu:26.10 |
All versions, plus listed versions 3.20.3-13.29.4-13.32.0-13.32.2-1 |
None known |
python-filelockUbuntu:26.04:LTS |
All versions, plus listed versions 3.18.0-13.20.0-13.20.2-13.20.3-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-112911 is a medium vulnerability (CVSS 6.3) in Tox-dev Filelock, published October 20, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.15%, the 4th percentile. Fixed in filelock 4.2.1.
References
github.com/tox-dev/filelock/security/advisories/GHSA-9c4x-gm8v-wgc4
github.com/tox-dev/filelock/pull/839
github.com/tox-dev/filelock/commit/bfa066d65a1ba9106f86ee9d027f7588b9c77e03
github.com/tox-dev/filelock/releases/tag/4.2.1
nvd.nist.gov/vuln/detail/CVE-2026-112911
github.com/advisories/GHSA-9c4x-gm8v-wgc4
Left out here: the rest of 2 source descriptions. The JSON record has them.