{"id":2591,"cve":"CVE-2026-112914","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-112914\/","cwe":"CWE-59","cwe_number":59,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/59","cvss_score":5.3,"published":"2026-10-20","owasp":"A01 Broken Access Control","odc":"Interface","cdc":"Incorrect Algorithm","category":"Design Defects","subcategory":"Poorly Designed Access Controls","scope":"Local","impact":"Unauthorized Access","summary":"SoftFileLock can be tricked via symlink to hard\u2011link files into the lock directory.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-112914\/","description":"filelock is a platform-independent file lock for Python. From 4.1.0 until 4.2.1, SoftFileLock can restore a stale marker by name after moving it aside, allowing another local user with rename access in a non-sticky lock directory to swap in a symbolic link and, on a runtime that follows the link and a same-filesystem target, make the lock user hard-link one of its files into the lock directory. This issue is fixed in version 4.2.1.","solution":"Upgrade filelock to version 4.2.1 or newer.","affected_component":"Python","fixed_by_upgrading":true,"vulnerable_code":"import os\nfrom filelock import SoftFileLock\n\ndef write_protected(path: str, data: str) -> None:\n    lock_path = os.path.join(os.path.dirname(path), \"my.lock\")\n    # VULNERABLE: SoftFileLock can be tricked via symlink attack after marker rename\n    lock = SoftFileLock(lock_path)\n    with lock:\n        with open(path, \"w\") as f:\n            f.write(data)\n","patched_code":"import os\nfrom filelock import FileLock\n\ndef write_protected(path: str, data: str) -> None:\n    lock_path = os.path.join(os.path.dirname(path), \"my.lock\")\n    # FIX: Use FileLock which atomically creates a hard\u2011link\u2011safe lock file\n    lock = FileLock(lock_path)\n    with lock:\n        with open(path, \"w\") as f:\n            f.write(data)\n","payload_needed":false,"payload":null,"payload_status":"none","published_fix":[{"repository":"tox-dev\/filelock","commit_url":"https:\/\/github.com\/tox-dev\/filelock\/commit\/740ff666b62a88496c8d7394e4e6230605e4d62b","commit_subject":"\ud83d\udc1b fix(soft): break stale markers without emptying the lock path (#843)","units":[{"file":"src\/filelock\/_api.py","function":null},{"file":"src\/filelock\/_api.py","function":"BaseFileLock._try_break_expired_lock"},{"file":"src\/filelock\/_lease.py","function":null},{"file":"src\/filelock\/_lease.py","function":"SoftFileLease._read_peer"},{"file":"src\/filelock\/_lease.py","function":"SoftFileLease._try_break_stale_lock"},{"file":"src\/filelock\/_lease.py","function":"_RefreshLoop.run"},{"file":"src\/filelock\/_marker.py","function":null},{"file":"src\/filelock\/_marker.py","function":"MarkerSoftFileLock._try_break_stale_lock"},{"file":"src\/filelock\/_soft.py","function":null},{"file":"src\/filelock\/_soft.py","function":"SoftFileLock._acquire"},{"file":"src\/filelock\/_soft.py","function":"SoftFileLock._marker_unchanged_for"},{"file":"src\/filelock\/_soft.py","function":"SoftFileLock._release"},{"file":"src\/filelock\/_soft.py","function":"SoftFileLock._try_break_stale_lock"},{"file":"src\/filelock\/_soft.py","function":"SoftFileLock._unlink_held_marker"},{"file":"src\/filelock\/_soft.py","function":"SoftFileLock._unlink_open_marker"},{"file":"src\/filelock\/_soft.py","function":"_read_lock_file"},{"file":"src\/filelock\/_unix.py","function":null},{"file":"src\/filelock\/_util.py","function":null},{"file":"src\/filelock\/_util.py","function":"break_lock_file"}]}],"references":null}