CVE-2026-112941: filelock: SoftReadWriteLock follows a lock tree swapped in after its first acquire and writes lock records into directories of the user running the lock

Published Oct 20, 2026
·
Updated

filelock is a platform-independent file lock for Python. From 4.1.0 until 4.2.1, SoftReadWriteLock and AsyncSoftReadWriteLock cache a successful check of the <path>.rw lock tree and resolve its names again during later record operations, allowing another local user who can replace that tree after the first acquisition to redirect lock-record writes into directories writable by the lock user. This issue is fixed in version 4.2.1.

Affected Software

1 affected component
pypi/filelock>=4.1.0<4.2.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade filelock to a version that resolves this vulnerability.

    Fixed in 4.2.1

Event History

Oct 20, 2026
CVE Published
via MITRE·02:43 PM
Data Sourced
via MITRE·02:43 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Systems using filelock versions 4.1.0 through 4.2.1 are affected when they use SoftReadWriteLock or AsyncSoftReadWriteLock and another local user can replace the <path>.rw lock tree after the lock is first acquired.

2

What access does an attacker need?

An attacker needs local access and the ability to replace the lock tree after a successful initial acquisition. Exploitation redirects subsequent lock-record writes into directories writable by the user running the lock.

3

Is there a fixed version?

Yes. The issue is fixed in filelock version 4.2.1.

4

What can be done before updating?

Restrict other local users from replacing or modifying the <path>.rw lock tree used by SoftReadWriteLock or AsyncSoftReadWriteLock. Avoid using these lock types in locations where untrusted local users can alter the lock tree.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203