Skip to content

← Actionable
Medium, CVSS 6.1amended

filelock: ReadWriteLock follows a symlink at the lock path into SQLite

CVE-2026-112936GHSA-j8f7-rjxc-mr56

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (filelock 4.0.9), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI filelock

    Affected
    >= 3.20.4, < 4.0.9
    Fixed in
    4.0.9

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.1 · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
EPSS
  • CVE-2026-112936: 0.23% estimated exploitation activity in the next 30 days; percentile 14.17 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary `ReadWriteLock` and `AsyncReadWriteLock` resolve the lock path with `pathlib.Path.resolve()` and pass it to `sqlite3.connect()` without refusing a symlink. A local user who can create names in the lock's directory, such as `/tmp` or a shared cache, can plant a symlink at the lock path and make the victim's process create, lock, or write the file it points to, or break mutual exclusion between the victim's own processes.

Details `ReadWriteLock.init` stores `pathlib.Path(lock_file).resolve()`, which follows a final symlink, and every connection opens that path through `sqlite3.connect()` with no `O_NOFOLLOW` or regular-file check. SQLite's own VFS also resolves the final symlink in user space, so `fs.protected_symlinks` and the sticky bit do not help: the kernel never sees a symlink to refuse. The other lock classes do not follow a final symlink: `FileLock` opens with `O_NOFOLLOW`, and `SoftReadWriteLock` coordinates through ` .rw/`.

Proof of concept On Linux,…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from osv record GHSA-j8f7-rjxc-mr56

  2. Revision 1 · created ·

    Published from ghsa record GHSA-j8f7-rjxc-mr56

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-112936

Advisory: filelock: ReadWriteLock follows a symlink at the lock path into SQLite
IDs: CVE-2026-112936, GHSA-j8f7-rjxc-mr56
Record: https://patchnext.com/advisories/cve-2026-112936 (revision 2, source checked 29 Oct 2026, 06:25 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: filelock 4.0.9. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI filelock: affected >= 3.20.4, < 4.0.9; fixed in 4.0.9

## Suggested inspection (read-only)
- `python -m pip show filelock`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on filelock.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-j8f7-rjxc-mr56 (GitHub-reviewed advisory GHSA-j8f7-rjxc-mr56 lists affected ranges: PyPI filelock >=3.20.4 <=4.0.8)
- Verified: https://osv.dev/vulnerability/GHSA-j8f7-rjxc-mr56 (OSV record GHSA-j8f7-rjxc-mr56 lists affected ranges: PyPI filelock >=3.20.4 <4.0.9 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…