Skip to content

The classifier judged this item not relevant to AI security, so it is left out of lists, feeds, the API and dataset releases. If that is wrong, report a correction on this page.

LowVulnerability

GHSA-9j6q-wvj5-jgjg: filelock: Symlink swap during SoftFileLock's writability check leaks whether a path exists and is writable by the lock taker

Published
Record updated
Affected
  • filelock >= 3.32.6, <= 4.2.0
Fixed in
4.2.1
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.2%

Summary

filelock versions 3.32.6 through 4.2.0 contain a symlink TOCTOU flaw in raise_on_not_writable_file(), which SoftFileLock and the locks sharing its acquire path call before each attempt. A local user who can create entries in the lock's directory can swap the lock path between a file and a symlink, so the lock user's acquire() reveals whether a chosen path exists and is writable by that user, one bit per acquire, with no content read or written. Linux fs.protected_symlinks blocks the attack in sticky world-writable directories such as /tmp, but not in 0777 directories without the sticky bit or in sticky group-writable ones.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.

Affected packages in the Exposure Registry

Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.

  • filelockPyPINo LLM dependency detected · 42 tracked dependents