{"id":2593,"cve":"CVE-2026-112934","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-112934\/","cwe":"CWE-62","cwe_number":62,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/62","cvss_score":6.1,"published":"2026-10-20","owasp":"A08 Software and Data Integrity Failures","odc":"Timing\/Serialization","cdc":"Serialization Issues","category":"Design Defects","subcategory":"Poorly Designed Access Controls","scope":"Local","impact":"Denial of Service (DoS)","summary":"SoftReadWriteLock can be hijacked via renamed pipes or hard links to stall or write through the lock.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-112934\/","description":"filelock is a platform-independent file lock for Python. From 4.0.0 until 4.2.1, SoftReadWriteLock refreshes holder records by name, allowing another local user with rename access to the lock directory to replace a record with a named pipe and stall the lock, or under a permissive hard-link policy to link a reachable target file and cause the lock user to write through it. This issue is fixed in version 4.2.1.","solution":"Upgrade the\u202ffilelock\u202fpackage to version\u202f4.2.1\u202for later.","affected_component":"Python","fixed_by_upgrading":true,"vulnerable_code":"import os\nfrom filelock import SoftReadWriteLock\n\ndef critical_section(path: str):\n    # VULNERABLE: refreshes holder record by name, allowing replacement attacks\n    lock = SoftReadWriteLock(os.path.join(path, \"lockdir\"))\n    lock.acquire()\n    try:\n        # critical work on a file inside the locked directory\n        with open(os.path.join(path, \"data.txt\"), \"a\") as f:\n            f.write(\"update\\n\")\n    finally:\n        lock.release()\n","patched_code":"import os\nfrom filelock import SoftReadWriteLock\n\ndef critical_section(path: str):\n    # FIX: use inode\u2011based validation to prevent record replacement\n    lock = SoftReadWriteLock(os.path.join(path, \"lockdir\"))\n    lock.refresh_by_name = False  # disable name\u2011based refresh\n    lock.acquire()\n    try:\n        # critical work on a file inside the locked directory\n        with open(os.path.join(path, \"data.txt\"), \"a\") as f:\n            f.write(\"update\\n\")\n    finally:\n        lock.release()\n","payload_needed":false,"payload":null,"payload_status":"none","published_fix":[{"repository":"tox-dev\/filelock","commit_url":"https:\/\/github.com\/tox-dev\/filelock\/commit\/bfa066d65a1ba9106f86ee9d027f7588b9c77e03","commit_subject":"\ud83d\udc1b fix(strict): keep claim directories private to the lock (#839)","units":[{"file":"src\/filelock\/_lease.py","function":null},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":null},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Files.create"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Files.overwrite"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"GenerationLog.commit"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"GenerationLog._extends_the_log"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"GenerationLog._list"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Ledger.observe"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Participant.heartbeat"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Participant.leave"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Participant._create_holder"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Participant._refresh_nonce"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Participant._unchanged_for_its_lease"},{"file":"src\/filelock\/_soft_rw\/_protocol.py","function":"Participant.__init__"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":null},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.create"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.link"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.listdir"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.overwrite"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.prepare"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.read"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.replace"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.unlink"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"OsFiles.__init__"},{"file":"src\/filelock\/_soft_rw\/_storage.py","function":"_identity"},{"file":"src\/filelock\/_soft_rw\/_sync.py","function":"SoftReadWriteLock._refresh"},{"file":"src\/filelock\/_soft_rw\/_sync.py","function":"SoftReadWriteLock._report_compromise"},{"file":"src\/filelock\/_strict.py","function":null},{"file":"src\/filelock\/_strict.py","function":"StrictSoftFileLock.force_break"},{"file":"src\/filelock\/_strict.py","function":"StrictSoftFileLock._acquire"},{"file":"src\/filelock\/_strict.py","function":"StrictSoftFileLock._attempt_doorway"},{"file":"src\/filelock\/_strict.py","function":"StrictSoftFileLock._discard_doorway"},{"file":"src\/filelock\/_strict.py","function":"StrictSoftFileLock._release"},{"file":"src\/filelock\/_strict.py","function":"StrictSoftFileLock._release_abandoned_holds"},{"file":"src\/filelock\/_strict.py","function":"_attempt_claim_read"},{"file":"src\/filelock\/_strict.py","function":"_ensure_protocol_directory"},{"file":"src\/filelock\/_strict.py","function":"_filesystem_now"},{"file":"src\/filelock\/_strict.py","function":"_inspect_lock_path"},{"file":"src\/filelock\/_strict.py","function":"_link_no_replace"},{"file":"src\/filelock\/_strict.py","function":"_list_claim_names"},{"file":"src\/filelock\/_strict.py","function":"_open_directory"},{"file":"src\/filelock\/_strict.py","function":"_open_or_create_sentinel"},{"file":"src\/filelock\/_strict.py","function":"_open_record"},{"file":"src\/filelock\/_strict.py","function":"_public_claim_names"},{"file":"src\/filelock\/_strict.py","function":"_publish_record"},{"file":"src\/filelock\/_strict.py","function":"_read_claims"},{"file":"src\/filelock\/_strict.py","function":"_read_existing_claims"},{"file":"src\/filelock\/_strict.py","function":"_read_record"},{"file":"src\/filelock\/_strict.py","function":"_reclaim_sentinel_private_records"},{"file":"src\/filelock\/_strict.py","function":"_require_exact_name"},{"file":"src\/filelock\/_strict.py","function":"_unlink_in_directory"},{"file":"src\/filelock\/_strict.py","function":"_unlink_owner_path"},{"file":"src\/filelock\/_strict.py","function":"_unlink_private_record_once"},{"file":"src\/filelock\/_util.py","function":null},{"file":"src\/filelock\/_windows.py","function":null},{"file":"tasks\/capabilities.py","function":null}]}],"references":null}