{"id":"CVE-2026-112941","kind":"vulnerability","aliases":["CVE-2026-112941"],"related":[],"title":"filelock: cached lock-tree check lets local users redirect lock writes","description":"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.","summary":"Python's filelock library, versions 4.1.0 through 4.2.1, caches a check of the <path>.rw lock directory and resolves its names again on later writes. A local user who can replace that directory after the first lock is taken can redirect lock-record writes into directories the lock user can write to.","severity":"low","cvss":3.3,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"tox-dev filelock","fixed":["4.2.1"],"affected":">= 4.1.0, < 4.2.1","ecosystem":"vendor"}],"ecosystems":["vendor"],"tags":["filelock","package","python","self-hosted"],"not_affected_if":["default-lock-types-only","single-user-machine"],"how_to_check":"- Run `pip show filelock` and confirm the installed version is between `4.1.0` and `4.2.0`.\n- Check whether code uses `SoftReadWriteLock` or `AsyncSoftReadWriteLock` from filelock.","fix":"- Upgrade filelock to `4.2.1` or later (`pip install -U \"filelock>=4.2.1\"`).","status":"open","published_at":"2026-10-20T15:17:16+00:00","first_seen_at":"2026-10-23T21:57:20+00:00","triaged_at":"2026-10-25T04:46:06+00:00","updated_at":"2026-10-25T04:46:06+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-25T04:46:06Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade filelock to `4.2.1` or later (`pip install -U \"filelock>=4.2.1\"`).","reach":"local","title":"filelock: cached lock-tree check lets local users redirect lock writes","impact":"low","summary":"Python's filelock library, versions 4.1.0 through 4.2.1, caches a check of the <path>.rw lock directory and resolves its names again on later writes. A local user who can replace that directory after the first lock is taken can redirect lock-record writes into directories the lock user can write to.","category":"package","nicknames":[],"who_cares":["python","filelock","self-hosted"],"confidence":0.7,"needs_auth":"yes","worst_case":"local user redirects lock writes into directories owned by the lock user","analyst_note":"","how_to_check":"- Run `pip show filelock` and confirm the installed version is between `4.1.0` and `4.2.0`.\n- Check whether code uses `SoftReadWriteLock` or `AsyncSoftReadWriteLock` from filelock.","needs_analyst":false,"not_affected_if":["single-user-machine","default-lock-types-only"],"who_is_affected":"Only projects that use filelock's SoftReadWriteLock or AsyncSoftReadWriteLock on a shared machine where another local user can write to the lock path. Single-user machines and containers where only the service account touches the lock directory face little practical risk.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"low"},"cost_usd":0.000599,"input_tokens":3389,"output_tokens":521,"severity_before":"low"},"analyst_status":null,"analyst_note":null,"search":"'-112941':15A,18A '-2026':14A,17A '4.1.0':34B,91C '4.2.1':36B,93C,147C 'acquisit':127C 'allow':115C 'anoth':116C 'asyncsoftreadwritelock':96C 'cach':2A,37B,97C 'check':6A,39B,100C 'cve':13A,16A 'dev':21A 'directori':44B,60B,74B,135C 'file':86C 'filelock':1A,22A,23B,31B,80C 'first':63B,126C 'fix':144C 'host':28B 'independ':85C 'issu':142C 'later':51B,112C 'let':7A 'librari':32B 'local':8A,54B,117C 'lock':4A,11A,43B,64B,70B,76B,87C,104C,131C,139C 'lock-record':69B,130C 'lock-tre':3A 'name':48B,109C 'oper':114C 'packag':24B 'platform':84C 'platform-independ':83C 'python':25B,29B,89C 'record':71B,113C,132C 'redirect':10A,68B,129C 'replac':58B,121C 'resolv':46B,107C 'rw':42B,103C 'self':27B 'self-host':26B 'softreadwritelock':94C 'success':99C 'taken':66B 'tox':20A 'tox-dev':19A 'tree':5A,105C,123C 'user':9A,55B,77B,118C,140C 'version':33B,146C 'writabl':136C 'write':12A,52B,72B,79B,133C","nicknames":[],"mitigations":[],"who_affected":"Only projects that use filelock's SoftReadWriteLock or AsyncSoftReadWriteLock on a shared machine where another local user can write to the lock path. Single-user machines and containers where only the service account touches the lock directory face little practical risk.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-20T15:17:16+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-112941","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112941","severity":null,"published_at":"2026-10-20T15:17:16+00:00","modified_at":"2026-10-21T17:52:25+00:00","first_seen_at":"2026-10-23T21:57:20+00:00","fetched_at":"2026-10-23T22:28:58+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}