GHSA-jcf5-mpj4-xfg8

Suggest an improvement
Source
https://github.com/advisories/GHSA-jcf5-mpj4-xfg8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-jcf5-mpj4-xfg8/GHSA-jcf5-mpj4-xfg8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jcf5-mpj4-xfg8
Aliases
Published
2026-12-04T21:37:56Z
Modified
2026-12-05T18:48:25Z
Severity
  • 4.4 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L CVSS Calculator
Summary
filelock: ReadWriteLock can remove unrelated empty directories
Details

Impact

On POSIX, ReadWriteLock can remove empty directories from an unrelated directory owned by the locking account. This requires a shared parent without the sticky bit where another local account can rename directories. The confirmed impact is confined to empty directories.

Affected versions and fix

Versions 4.2.1 through 4.2.12 are affected. Upgrade to filelock 4.3.0 or later. Cleanup verifies that it removed a link to the lock database before removing directories. An interrupted acquisition can leave an empty directory behind without blocking future acquisitions. PR #973

Workaround

Use a parent directory where untrusted accounts cannot rename entries.

Credits

Reported by OSS Scanner (ANT-2026-KHP4PR98).

Database specific
{
    "cwe_ids":  [
        "CWE-610"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-12-04T21:37:56Z",
    "nvd_published_at":  "2026-12-03T19:17:32Z",
    "severity":  "MODERATE"
}
References

Affected packages

PyPI / filelock

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.2.1
Fixed
4.3.0

Affected versions

4.*
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.2.6
4.2.7
4.2.8
4.2.9
4.2.10
4.2.11
4.2.12

Database specific

last_known_affected_version_range
"<= 4.2.12"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-jcf5-mpj4-xfg8/GHSA-jcf5-mpj4-xfg8.json"