Filelock
Monthly
filelock's SQLite-backed ReadWriteLock (versions 3.20.4 through 4.2.0) can be tricked into overwriting or unlinking the side files SQLite keeps next to a locked database, and - when a writable hot journal is also present - into writing attacker-chosen content into that database. This is a genuine but conditional local-privilege issue rather than a widespread remote threat: it requires an existing low-privileged local account with rename/write access in a non-sticky parent directory at or above the database path, and it is a timing-sensitive race that does not apply when every parent directory is owned by the locking account or root and is either non-group/other-writable or carries the sticky bit. No public exploit identified at time of analysis and no CISA KEV entry; vendor-released patch: 4.2.1.
Symlink or junction replacement of the `<path>.rw` lock tree in Python's filelock 4.1.0 through 4.2.0 lets a second, co-located local user redirect the lock-record writes that SoftReadWriteLock and AsyncSoftReadWriteLock perform after acquisition - most notably periodic heartbeat rewrites of holder records - into directories writable by the lock-owning user. The root cause is a time-of-check/time-of-use gap: the classes cached the successful ownership check made at first acquisition and re-resolved the `gen` and `holders` names by path on every later record operation, so a tree swapped in during that window is followed. Impact is limited to integrity (CVSS 3.1 base 3.3, AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N) and requires an existing local account plus a lock path whose parent directory that account can modify; there is no remote vector, no public exploit identified at time of analysis, and no CISA KEV listing. The issue is fixed in filelock 4.2.1.
SoftFileLock, MarkerSoftFileLock, and SoftFileLease in the Python filelock package from 3.22.0 through 4.2.0 can be tricked into deleting a live holder's marker file, because the stale-owner check trusts a process identifier and start token stored in a marker that an attacker with write access to the same directory can rewrite but not remove (CWE-345). An authorized local contender - another process running under the holder's account, or root - can therefore act as a confused deputy, drop the live marker, and admit a second holder into a lock that should have stayed exclusive, undermining mutual exclusion for whatever resource the lock guards. The CVSS 3.1 vector scores this 4.7 (AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N), reflecting local-only access, high attack complexity, and integrity-only impact; no public exploit code and no confirmed active exploitation were identified at time of analysis, and the upstream advisory, PR #836, and commit eeceaa84 accompany the fixed release 4.2.1. Exploitation is further gated on non-default conditions - mismatched Linux time-namespace boottime offsets, an unreadable boot_id on one side, or direct marker rewriting - making this a genuine but narrowly scoped, lower-priority issue rather than a drop-everything emergency.
A time-of-check-to-time-of-use (TOCTOU) flaw in the Python filelock library's ReadWriteLock, present from 4.1.0 through 4.2.0, allows a second local account to abuse rename rights in a shared, non-sticky parent directory to observe the randomized .filelock-* private hard-link directory name or forge a dead-owner sweep name, then rename a sibling directory onto that name so the lock's cleanup deletes it - producing high integrity impact with limited availability impact on data the attacker does not own. Exploitation requires a local account on the same host, rename access in a parent directory that is group/other-writable and lacks the sticky bit, and an application that places its ReadWriteLock database in such a shared location; deployments where the database directory is owned by the locking account or root and is not group/other-writable, or where parent directories are sticky, are not affected. The issue is fixed in 4.2.1, and no public exploit code was identified at time of analysis.
Symlink redirection in filelock's ReadWriteLock and AsyncReadWriteLock (versions 3.20.4 through 4.0.8) allows a local user with write access to a shared lock directory to plant a symbolic link at the lock database path, causing SQLite to create, open, or lock a different file than the one the victim intended. The practical effect is integrity loss - mutual exclusion can be split between two targets so two processes believe they hold the same lock, and a lock database can be forced into an attacker-chosen location - with a modest availability impact from the resulting SQLite errors. The attacker must already hold a local account (PR:L, AV:L, unauthenticated network access is not a factor), must be able to create names in the lock directory before the victim initialises its lock, and the victim must actually use the newer ReadWriteLock classes rather than the classic FileLock. There is no confirmed active exploitation (not in CISA KEV) and no public exploit code identified at time of analysis, and the issue is fixed in filelock 4.0.9.
The Python filelock library (versions 3.22.0 through 4.2.0) can admit two simultaneous lock holders because its SoftFileLock, MarkerSoftFileLock and SoftFileLease classes mishandle stale-marker breaking when the underlying filesystem recycles a freed inode number. A local attacker with write access to the lock directory who wins a narrow race - freeing their own marker after the stale read, while an honest contender creates a live successor on the reused inode whose modification time is not newer than the saved observation - can cause the honest holder's live marker to be deleted, producing a mutual-exclusion failure with integrity impact. Exploitation requires a local, authenticated account on a shared host, a filesystem that reuses inode numbers (ext4 is named in the advisory), and the non-default soft lock classes; attack complexity is high and no public exploit code was identified at time of analysis, and the issue is not in CISA KEV. The vendor-released patch is 4.2.1.
SoftReadWriteLock in the Python filelock package (4.0.0 through 4.2.0) refreshes holder records by pathname without verifying that the name still resolves to the file it originally created, so a local user who can rename entries in the lock directory can substitute a named pipe (FIFO) and stall the lock, or - where the hard-link policy is permissive - link a file the victim can reach and cause the lock holder to write through it. Exploitation requires an authenticated local account sharing the lock directory (CVSS PR:L, AV:L), so this is a locally-exploitable, medium-severity issue (CVSS 6.1, integrity low, availability high) rather than a remote one; no public exploit code was identified at time of analysis and the flaw is fixed in filelock 4.2.1.
Local denial of service in the Python `filelock` package (versions 3.20.4 through 4.2.0) allows a second local account to stall or hang lock acquisition through `ReadWriteLock` by planting a crafted SQLite lock database at the database path; the library loads the database schema without bounding the schema or query work, so an oversized schema burns past the acquire timeout. Only local attackers holding a valid account are relevant (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, 5.5), and the outcome is availability loss only - no confidentiality or integrity impact - though the practical triggerability depends on the lock database living in a directory other accounts can write, which is precisely the condition the fix addresses. Exposure occurs on the initial per-instance database open for 3.20.4 and later, and repeats on every acquisition from 3.30.0 onward, so the hang is more reliably reproducible on newer releases. No public exploit code has been identified at time of analysis and there is no CISA KEV listing; a vendor-released patch is available in 4.2.1.
A local, low-privileged user (PR:L) who can rename files in a shared, non-sticky-bit lock directory can abuse the Python filelock package's SoftFileLock, MarkerSoftFileLock, or SoftFileLease marker-restore path in versions 4.1.0 through 4.2.0 to make the lock owner hard-link one of its own files into the lock directory, exposing file contents and causing limited integrity impact. The race is high-complexity and timing-dependent, requires a second local account plus a non-default shared-directory configuration, and no public exploit code has been identified at the time of analysis. All signals point to a genuinely low operational priority despite the MEDIUM 5.3 CVSS.
Local information disclosure in the Python filelock library allows a low-privileged local user to infer whether an attacker-chosen path exists and is writable by racing a symbolic link into SoftFileLock's writability check. SoftFileLock versions 3.32.6 through 4.2.0 follow a symlink swapped in at the lock path when the lock node lacks its owner-write bit, so the observable acquisition result leaks the target path's existence and write status (CWE-59, CVSS 2.5). Exploitation requires local access, a specific permission and symlink-following configuration, and winning a TOCTOU race; no public exploit has been identified at time of analysis, and the issue is fixed in 4.2.1.
The Python `filelock` package's opt-in `StrictSoftFileLock` (3.30.0 through <4.2.1) and `SoftReadWriteLock` (4.0.0 through <4.2.1) can adopt a protocol directory (`<path>.filelock`/`claims` or `<path>.rw`/`gen`/`holders`) that another local account created first inside a shared, non-sticky parent directory, letting that account tamper with protocol state and admit two concurrent lock holders. Only local attackers on the same host who win the creation race can exploit it; the default `FileLock` class is not affected, there is no confidentiality impact, and the race/ordering requirement raises attack complexity. No public exploit code was identified at time of analysis, and the issue is fixed in filelock 4.2.1.
Python filelock's UnixFileLock truncates a regular file that a second local user has renamed onto the lock path (or hard-linked there when hard-link protections are relaxed), destroying that file's contents; when an explicit mode is requested, versions from 3.10.2 onward can additionally fchmod the file to the lock's mode. Exploitation requires a low-privileged local account (CVSS PR:L) plus rename/write permission on the directory holding the lock file, or a host with fs.protected_hardlinks disabled, so only multi-user shared lock directories and permissive-hardlink systems are exposed - no remote or unauthenticated path exists. Fixed in 4.2.1; no public exploit identified at time of analysis, and EPSS/KEV data are not available for this CVE.
Python's filelock library, versions 4.1.0 through 4.2.0, allows a local attacker who is already contending on the same lock path to trick the SoftFileLock, MarkerSoftFileLock, and SoftFileLease implementations into deleting a legitimate holder's live marker file, silently breaking the mutual exclusion the lock is supposed to guarantee and letting concurrent processes enter a protected critical section together. Exploitation is not trivial: it requires a pre-dated attacker marker that is removed on cue, at least two waiting contenders, coarse or matching modification times that preserve the stale observation, and inode reuse on the filesystem (ext4 is the named enabler) so that an honest contender's fresh marker lands on the recycled inode. The impact is integrity-only with no confidentiality or availability component, the vector is strictly local and high-complexity (CVSS 4.7), no public exploit code was identified at time of analysis, and the flaw is fixed in 4.2.1.
Python's filelock SoftFileLock implementation prior to version 3.20.3 contains a TOCTOU race condition that allows local attackers with symlink creation privileges to interfere with lock file operations between permission validation and file creation. An attacker can exploit this window to create a symlink at the target lock path, causing lock operations to fail or redirect to unintended files, resulting in denial of service or unexpected behavior. Upgrade to filelock version 3.20.3 or later to remediate this vulnerability.
filelock's SQLite-backed ReadWriteLock (versions 3.20.4 through 4.2.0) can be tricked into overwriting or unlinking the side files SQLite keeps next to a locked database, and - when a writable hot journal is also present - into writing attacker-chosen content into that database. This is a genuine but conditional local-privilege issue rather than a widespread remote threat: it requires an existing low-privileged local account with rename/write access in a non-sticky parent directory at or above the database path, and it is a timing-sensitive race that does not apply when every parent directory is owned by the locking account or root and is either non-group/other-writable or carries the sticky bit. No public exploit identified at time of analysis and no CISA KEV entry; vendor-released patch: 4.2.1.
Symlink or junction replacement of the `<path>.rw` lock tree in Python's filelock 4.1.0 through 4.2.0 lets a second, co-located local user redirect the lock-record writes that SoftReadWriteLock and AsyncSoftReadWriteLock perform after acquisition - most notably periodic heartbeat rewrites of holder records - into directories writable by the lock-owning user. The root cause is a time-of-check/time-of-use gap: the classes cached the successful ownership check made at first acquisition and re-resolved the `gen` and `holders` names by path on every later record operation, so a tree swapped in during that window is followed. Impact is limited to integrity (CVSS 3.1 base 3.3, AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N) and requires an existing local account plus a lock path whose parent directory that account can modify; there is no remote vector, no public exploit identified at time of analysis, and no CISA KEV listing. The issue is fixed in filelock 4.2.1.
SoftFileLock, MarkerSoftFileLock, and SoftFileLease in the Python filelock package from 3.22.0 through 4.2.0 can be tricked into deleting a live holder's marker file, because the stale-owner check trusts a process identifier and start token stored in a marker that an attacker with write access to the same directory can rewrite but not remove (CWE-345). An authorized local contender - another process running under the holder's account, or root - can therefore act as a confused deputy, drop the live marker, and admit a second holder into a lock that should have stayed exclusive, undermining mutual exclusion for whatever resource the lock guards. The CVSS 3.1 vector scores this 4.7 (AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N), reflecting local-only access, high attack complexity, and integrity-only impact; no public exploit code and no confirmed active exploitation were identified at time of analysis, and the upstream advisory, PR #836, and commit eeceaa84 accompany the fixed release 4.2.1. Exploitation is further gated on non-default conditions - mismatched Linux time-namespace boottime offsets, an unreadable boot_id on one side, or direct marker rewriting - making this a genuine but narrowly scoped, lower-priority issue rather than a drop-everything emergency.
A time-of-check-to-time-of-use (TOCTOU) flaw in the Python filelock library's ReadWriteLock, present from 4.1.0 through 4.2.0, allows a second local account to abuse rename rights in a shared, non-sticky parent directory to observe the randomized .filelock-* private hard-link directory name or forge a dead-owner sweep name, then rename a sibling directory onto that name so the lock's cleanup deletes it - producing high integrity impact with limited availability impact on data the attacker does not own. Exploitation requires a local account on the same host, rename access in a parent directory that is group/other-writable and lacks the sticky bit, and an application that places its ReadWriteLock database in such a shared location; deployments where the database directory is owned by the locking account or root and is not group/other-writable, or where parent directories are sticky, are not affected. The issue is fixed in 4.2.1, and no public exploit code was identified at time of analysis.
Symlink redirection in filelock's ReadWriteLock and AsyncReadWriteLock (versions 3.20.4 through 4.0.8) allows a local user with write access to a shared lock directory to plant a symbolic link at the lock database path, causing SQLite to create, open, or lock a different file than the one the victim intended. The practical effect is integrity loss - mutual exclusion can be split between two targets so two processes believe they hold the same lock, and a lock database can be forced into an attacker-chosen location - with a modest availability impact from the resulting SQLite errors. The attacker must already hold a local account (PR:L, AV:L, unauthenticated network access is not a factor), must be able to create names in the lock directory before the victim initialises its lock, and the victim must actually use the newer ReadWriteLock classes rather than the classic FileLock. There is no confirmed active exploitation (not in CISA KEV) and no public exploit code identified at time of analysis, and the issue is fixed in filelock 4.0.9.
The Python filelock library (versions 3.22.0 through 4.2.0) can admit two simultaneous lock holders because its SoftFileLock, MarkerSoftFileLock and SoftFileLease classes mishandle stale-marker breaking when the underlying filesystem recycles a freed inode number. A local attacker with write access to the lock directory who wins a narrow race - freeing their own marker after the stale read, while an honest contender creates a live successor on the reused inode whose modification time is not newer than the saved observation - can cause the honest holder's live marker to be deleted, producing a mutual-exclusion failure with integrity impact. Exploitation requires a local, authenticated account on a shared host, a filesystem that reuses inode numbers (ext4 is named in the advisory), and the non-default soft lock classes; attack complexity is high and no public exploit code was identified at time of analysis, and the issue is not in CISA KEV. The vendor-released patch is 4.2.1.
SoftReadWriteLock in the Python filelock package (4.0.0 through 4.2.0) refreshes holder records by pathname without verifying that the name still resolves to the file it originally created, so a local user who can rename entries in the lock directory can substitute a named pipe (FIFO) and stall the lock, or - where the hard-link policy is permissive - link a file the victim can reach and cause the lock holder to write through it. Exploitation requires an authenticated local account sharing the lock directory (CVSS PR:L, AV:L), so this is a locally-exploitable, medium-severity issue (CVSS 6.1, integrity low, availability high) rather than a remote one; no public exploit code was identified at time of analysis and the flaw is fixed in filelock 4.2.1.
Local denial of service in the Python `filelock` package (versions 3.20.4 through 4.2.0) allows a second local account to stall or hang lock acquisition through `ReadWriteLock` by planting a crafted SQLite lock database at the database path; the library loads the database schema without bounding the schema or query work, so an oversized schema burns past the acquire timeout. Only local attackers holding a valid account are relevant (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, 5.5), and the outcome is availability loss only - no confidentiality or integrity impact - though the practical triggerability depends on the lock database living in a directory other accounts can write, which is precisely the condition the fix addresses. Exposure occurs on the initial per-instance database open for 3.20.4 and later, and repeats on every acquisition from 3.30.0 onward, so the hang is more reliably reproducible on newer releases. No public exploit code has been identified at time of analysis and there is no CISA KEV listing; a vendor-released patch is available in 4.2.1.
A local, low-privileged user (PR:L) who can rename files in a shared, non-sticky-bit lock directory can abuse the Python filelock package's SoftFileLock, MarkerSoftFileLock, or SoftFileLease marker-restore path in versions 4.1.0 through 4.2.0 to make the lock owner hard-link one of its own files into the lock directory, exposing file contents and causing limited integrity impact. The race is high-complexity and timing-dependent, requires a second local account plus a non-default shared-directory configuration, and no public exploit code has been identified at the time of analysis. All signals point to a genuinely low operational priority despite the MEDIUM 5.3 CVSS.
Local information disclosure in the Python filelock library allows a low-privileged local user to infer whether an attacker-chosen path exists and is writable by racing a symbolic link into SoftFileLock's writability check. SoftFileLock versions 3.32.6 through 4.2.0 follow a symlink swapped in at the lock path when the lock node lacks its owner-write bit, so the observable acquisition result leaks the target path's existence and write status (CWE-59, CVSS 2.5). Exploitation requires local access, a specific permission and symlink-following configuration, and winning a TOCTOU race; no public exploit has been identified at time of analysis, and the issue is fixed in 4.2.1.
The Python `filelock` package's opt-in `StrictSoftFileLock` (3.30.0 through <4.2.1) and `SoftReadWriteLock` (4.0.0 through <4.2.1) can adopt a protocol directory (`<path>.filelock`/`claims` or `<path>.rw`/`gen`/`holders`) that another local account created first inside a shared, non-sticky parent directory, letting that account tamper with protocol state and admit two concurrent lock holders. Only local attackers on the same host who win the creation race can exploit it; the default `FileLock` class is not affected, there is no confidentiality impact, and the race/ordering requirement raises attack complexity. No public exploit code was identified at time of analysis, and the issue is fixed in filelock 4.2.1.
Python filelock's UnixFileLock truncates a regular file that a second local user has renamed onto the lock path (or hard-linked there when hard-link protections are relaxed), destroying that file's contents; when an explicit mode is requested, versions from 3.10.2 onward can additionally fchmod the file to the lock's mode. Exploitation requires a low-privileged local account (CVSS PR:L) plus rename/write permission on the directory holding the lock file, or a host with fs.protected_hardlinks disabled, so only multi-user shared lock directories and permissive-hardlink systems are exposed - no remote or unauthenticated path exists. Fixed in 4.2.1; no public exploit identified at time of analysis, and EPSS/KEV data are not available for this CVE.
Python's filelock library, versions 4.1.0 through 4.2.0, allows a local attacker who is already contending on the same lock path to trick the SoftFileLock, MarkerSoftFileLock, and SoftFileLease implementations into deleting a legitimate holder's live marker file, silently breaking the mutual exclusion the lock is supposed to guarantee and letting concurrent processes enter a protected critical section together. Exploitation is not trivial: it requires a pre-dated attacker marker that is removed on cue, at least two waiting contenders, coarse or matching modification times that preserve the stale observation, and inode reuse on the filesystem (ext4 is the named enabler) so that an honest contender's fresh marker lands on the recycled inode. The impact is integrity-only with no confidentiality or availability component, the vector is strictly local and high-complexity (CVSS 4.7), no public exploit code was identified at time of analysis, and the flaw is fixed in 4.2.1.
Python's filelock SoftFileLock implementation prior to version 3.20.3 contains a TOCTOU race condition that allows local attackers with symlink creation privileges to interfere with lock file operations between permission validation and file creation. An attacker can exploit this window to create a symlink at the target lock path, causing lock operations to fail or redirect to unintended files, resulting in denial of service or unexpected behavior. Upgrade to filelock version 3.20.3 or later to remediate this vulnerability.