Every CVE Search/ Get API key

CVE-2026-112912

filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker

2.5 LowFix available

filelock is a platform-independent file lock for Python. From 3.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. 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
Low
Integrity
None
Availability
None

Exploit likelihood

0.21%Unchanged since Oct 21, 2026
90%50%10%1%

What each source reports

CVE List Score used 2.5

filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker

filelock is a platform-independent file lock for Python. From 3.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. This issue is fixed in version 4.2.1.

Record
CVE-2026-112912
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Weakness
CWE-59
Updated
2026-11-02
EUVDEUVD-2026-105019 2.5

filelock is a platform-independent file lock for Python. From 3.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. This issue is fixed in version 4.2.1.

Record
EUVD-2026-105019
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-9j6q-wvj5-jgjg 2.5

filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker

raise_on_not_writable_file() is the check that SoftFileLock and the locks sharing its acquire path run before every attempt. It looks at the lock path with os.lstat, so that it judges a planted symlink (a file that points at another path) by itself. When the node has no owner-write bit, it then calls os.access(filename, os.W_OK), which follows symlinks. A local user who can create entries in the lock's directory can swap the path between a mode-0466 file and a symlink to a path of their choosing. The second call then reports on the symlink's target with the permissions of the user running the lock (below: the lock user). The lock user's acquire() ends in PermissionError within a fraction of a second when the target is missing or not writable by the lock user, and in the ordinary Timeout otherwise.

That yields one bit per watched acquire. The bit says whether a path exists and is writable by the lock taker. It covers paths under directories the other user cannot search, or any path when root takes the lock. The lock does not open, create or modify anything through the symlink. On Linux, fs.protected_symlinks (a kernel setting that refuses to follow another user's symlink in a sticky world-writable directory) blocks it in a directory such as /tmp. It does not block it in a 0777 directory without the sticky bit (a directory flag that lets only a file's owner remove or rename it) or in a sticky group-writable one. This reopens the leak PR #567 closed. Affected versions are filelock 3.32.6 through 4.2.0.

Anthropic's OSS Scanner reported this in private. Finding covered by this advisory:

  • ANT-2026-RQ91AXTW [medium, CWE-59]: Symlink TOCTOU in raise_on_not_writable_file leaks file existence.

Severity

CVSS 3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N scores 2.5 (Low).

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 swap has to land between two system calls a few bytecodes apart (6 to 12 % of back-to-back acquires with the other user on a second CPU, 1 in 8 000 on one CPU), and the other user has to observe how the lock user's acquire ended. C:L (partial confidentiality impact): one bit per acquire (existence or writability of a chosen path), no content. I:N and A:N (no integrity or availability impact). S:U (scope unchanged).

Classification from the review: security, conditional, "a one-bit probe of a victim-only path" that "Linux protected symlinks block in the common sticky /tmp case, but not every shared directory". The scanner rated this medium. The maintainers score it low for the complexity and the one-bit yield.

Scope and preconditions

  • The affected classes are SoftFileLock and everything that reuses its _acquire: MarkerSoftFileLock, SoftFileLease, the async soft locks, and FileLock after an ENOSYS fallback to a soft lock. UnixFileLock itself does not call the helper. WindowsFileLock._acquire() does, but on Windows os.access reads the link's own read-only attribute and does not follow it; that branch did not run.
  • The other user must be able to create entries in the lock's directory. With Linux defaults (fs.protected_symlinks=1) the kernel refuses the lock user's attempt to follow another user's symlink in a directory that is both sticky and world-writable. /tmp therefore gives PermissionError for every target and leaks nothing. A 0777 directory without the sticky bit, or a sticky group-writable one (1770 with a shared group), has no such cover and leaks as described. macOS and the BSDs have no fs.protected_symlinks, and a symlink there has mode bits of its own, so one without the owner-write bit would reach os.access with no swap at all (not executed).
  • The swap is practical only with a second CPU for the other user.
  • The other user needs to see how the lock user's acquire ended, for…
Record
GHSA-9j6q-wvj5-jgjg
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Weakness
CWE-59
Updated
2026-11-02
NVD 2.5

filelock is a platform-independent file lock for Python. From 3.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. This issue is fixed in version 4.2.1.

Record
CVE-2026-112912
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Weakness
CWE-59
Updated
2026-11-02
OSV 2.5

filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker

filelock is a platform-independent file lock for Python. From 3.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. This issue is fixed in version 4.2.1.

Record
CVE-2026-112912
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Weakness
CWE-59
Updated
2026-11-02
OSVDEBIAN-CVE-2026-112912 2.5

filelock is a platform-independent file lock for Python. From 3.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. This issue is fixed in version 4.2.1.

Record
DEBIAN-CVE-2026-112912
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Updated
2026-11-02
OSVGHSA-9j6q-wvj5-jgjg 2.5

filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker

raise_on_not_writable_file() is the check that SoftFileLock and the locks sharing its acquire path run before every attempt. It looks at the lock path with os.lstat, so that it judges a planted symlink (a file that points at another path) by itself. When the node has no owner-write bit, it then calls os.access(filename, os.W_OK), which follows symlinks. A local user who can create entries in the lock's directory can swap the path between a mode-0466 file and a symlink to a path of their choosing. The second call then reports on the symlink's target with the permissions of the user running the lock (below: the lock user). The lock user's acquire() ends in PermissionError within a fraction of a second when the target is missing or not writable by the lock user, and in the ordinary Timeout otherwise.

That yields one bit per watched acquire. The bit says whether a path exists and is writable by the lock taker. It covers paths under directories the other user cannot search, or any path when root takes the lock. The lock does not open, create or modify anything through the symlink. On Linux, fs.protected_symlinks (a kernel setting that refuses to follow another user's symlink in a sticky world-writable directory) blocks it in a directory such as /tmp. It does not block it in a 0777 directory without the sticky bit (a directory flag that lets only a file's owner remove or rename it) or in a sticky group-writable one. This reopens the leak PR #567 closed. Affected versions are filelock 3.32.6 through 4.2.0.

Anthropic's OSS Scanner reported this in private. Finding covered by this advisory:

  • ANT-2026-RQ91AXTW [medium, CWE-59]: Symlink TOCTOU in raise_on_not_writable_file leaks file existence.

Severity

CVSS 3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N scores 2.5 (Low).

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 swap has to land between two system calls a few bytecodes apart (6 to 12 % of back-to-back acquires with the other user on a second CPU, 1 in 8 000 on one CPU), and the other user has to observe how the lock user's acquire ended. C:L (partial confidentiality impact): one bit per acquire (existence or writability of a chosen path), no content. I:N and A:N (no integrity or availability impact). S:U (scope unchanged).

Classification from the review: security, conditional, "a one-bit probe of a victim-only path" that "Linux protected symlinks block in the common sticky /tmp case, but not every shared directory". The scanner rated this medium. The maintainers score it low for the complexity and the one-bit yield.

Scope and preconditions

  • The affected classes are SoftFileLock and everything that reuses its _acquire: MarkerSoftFileLock, SoftFileLease, the async soft locks, and FileLock after an ENOSYS fallback to a soft lock. UnixFileLock itself does not call the helper. WindowsFileLock._acquire() does, but on Windows os.access reads the link's own read-only attribute and does not follow it; that branch did not run.
  • The other user must be able to create entries in the lock's directory. With Linux defaults (fs.protected_symlinks=1) the kernel refuses the lock user's attempt to follow another user's symlink in a directory that is both sticky and world-writable. /tmp therefore gives PermissionError for every target and leaks nothing. A 0777 directory without the sticky bit, or a sticky group-writable one (1770 with a shared group), has no such cover and leaks as described. macOS and the BSDs have no fs.protected_symlinks, and a symlink there has mode bits of its own, so one without the owner-write bit would reach os.access with no swap at all (not executed).
  • The swap is practical only with a second CPU for the other user.
  • The other user needs to see how the lock user's acquire ended, for…
Record
GHSA-9j6q-wvj5-jgjg
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Weakness
CWE-59
Updated
2026-11-02
OSVUBUNTU-CVE-2026-112912 2.5

filelock is a platform-independent file lock for Python. From 3.32.6 until 4.2.1, SoftFileLock can follow a swapped symbolic link during the conditional os.access writability check for a node without its owner-write bit, allowing another local user on a platform and directory configuration that follows the link to infer whether a chosen path exists and is writable from the observable acquisition result. This issue is fixed in version 4.2.1.

Record
UBUNTU-CVE-2026-112912
CVSS 3.1
2.5 LowCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
filelock
PyPI
3.32.6 to 4.2.0
4.2.1
python-filelock
Debian: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 less
3.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-filelock
Debian: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 less
3.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-filelock
Debian: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 less
3.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
filelock
PyPI
3.32.6 up to 4.2.1, plus listed versions
3.32.74.0.04.0.14.0.104.0.11
Show 13 moreShow less
4.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-filelock
Ubuntu: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-filelock
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
3.0.12-13.0.12-23.0.12-2ubuntu0.1~esm1
None known
python-filelock
Ubuntu: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-filelock
Ubuntu: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-filelock
Ubuntu:26.10
All versions, plus listed versions
3.20.3-13.29.4-13.32.0-13.32.2-1
None known
python-filelock
Ubuntu:26.04:LTS
All versions, plus listed versions
3.18.0-13.20.0-13.20.2-13.20.3-1
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-112912 is a low vulnerability (CVSS 2.5) 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.21%, the 11th percentile. Fixed in filelock 4.2.1.

References

Show 5 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open