Skip to main content
CVE-2025-68146VulnerabilityPublished Updated

Ansible lint: filelock has a TOCTOU race condition which allows symlink attacks during lock file creation

Affects ansible-lintSource GCVE Database

0
Compare
Authoritative record:CVE-2025-68146· Medium 6.3

Not known to be exploited · CVSS 6.3 Medium : upgrade to 25.12.2 when convenient.

Data as of 22 Nov 2026, 18:24 UTC

CVSS 3.1 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 25.12.2
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 16 Dec 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 21 Nov 2026.

What to do

Upgrade ansible-lint to 25.12.2.

Affected software

ProductAffectedFixed in
Homebrewansible-lintpkg:brew/ansible-lintOther threatsAffected
  • >=6.5.0 <25.12.2
Fixed in
  • 25.12.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in filelock version 3.20.1 that addresses the race condition by preventing symlink following during lock acquisition. Users should upgrade to version 3.20.1 or later immediately. If upgrading is not possible, partial mitigations include using SoftFileLock instead of UnixFileLock/WindowsFileLock, restricting lock file directory permissions to prevent untrusted symlink creation, and monitoring lock file directories for suspicious symlinks. However, these workarounds do not fully eliminate the race condition risk. The recommended action is to apply the official fix by upgrading.

Description

A TOCTOU (Time-of-Check-Time-of-Use) race condition in the filelock library allows local attackers to exploit a window between checking for a lock file's existence and opening it with truncation flags. By creating a symlink during this window, an attacker can cause the victim application to truncate arbitrary files, potentially corrupting or deleting critical data. This affects Unix, Linux, macOS, and Windows systems using filelock, impacting dependent tools like virtualenv, PyTorch, poetry, and tox. The vulnerability requires local filesystem access and the ability to create symlinks. It is fixed in filelock version 3.20.1 by adding safeguards against symlink following during lock acquisition.

References

Community reviews

Loading reviews…