Skip to main content
VulnerabilityPublished Updated

CVE-2026-22701: Pipenv · filelock Time-of-Check-Time-of-Use (TOCTOU) Symlink Vulnerability in SoftFileLock

Affects pipenvSource GCVE Database

0
Compare
Authoritative record:CVE-2026-22701· Medium 5.3

Not known to be exploited · CVSS 5.3 Medium : upgrade to 2026.0.3_1 when convenient.

Data as of 26 Nov 2026, 21:22 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 1% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 2026.0.3_1, 3.20.3
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 10 Jan 2026

  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 26 Nov 2026.

What to do

Upgrade pipenv to 2026.0.3_1; filelock to 3.20.3.

Affected software

ProductAffectedFixed in
Homebrewpipenvpkg:brew/pipenvOther threatsAffected
  • >=2018.11.26_4 <2026.0.3_1
Fixed in
  • 2026.0.3_1
PyPIfilelockpkg:pypi/filelockOther threatsAffected
  • <3.20.3
Fixed in
  • 3.20.3

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 version 2026.0.3_1 that adds the O_NOFOLLOW flag to prevent symlink attacks during lock file creation. Users should upgrade to this version when possible. For critical environments where immediate upgrade is not feasible, users should avoid using SoftFileLock in security-sensitive contexts and prefer UnixFileLock or WindowsFileLock. Additionally, restricting filesystem permissions to prevent untrusted users from creating symlinks in lock file directories, isolating untrusted code from lock file paths, and implementing application-level checks to verify successful lock acquisition are recommended mitigations.

Description

A Time-of-Check-Time-of-Use (TOCTOU) race condition vulnerability exists in the SoftFileLock implementation of the filelock package used by pipenv. An attacker with local filesystem access and permission to create symlinks can exploit a race window between permission checking and file creation to cause lock operations to fail or behave unexpectedly. This can lead to silent lock acquisition failures, denial of service, resource serialization failures, or unintended file operations. The vulnerability has been patched by adding the O_NOFOLLOW flag to prevent symlink following during lock file creation. Users should upgrade to the patched version 2026.0.3_1 or later and consider alternative lock implementations or filesystem permission restrictions as workarounds.

References

Community reviews

Loading reviews…