Summary
CVE-2026-121716 affects fzf-tmux option handling: crafted layout values can trigger command substitution during Bash arithmetic expansion, while geometry values containing spaces can inject additional tmux flags. The risk arises when a victim invokes fzf-tmux with values supplied by a less-trusted project configuration, wrapper, or plugin; commands may then run as the invoking user.
Affected context
The issue occurs in the bin/fzf-tmux shell script when it processes layout and popup geometry options. Attached -l and -u values reach Bash arithmetic expansion without adequate validation, and values for -x, -y, -w, -h, and -p can reach an unquoted tmux popup option string. The risk depends on untrusted values being supplied and the victim invoking the script.
Exploit preconditions
- Attack surface: Local command-line invocation of
fzf-tmux - Required access: Ability to influence option values through a project configuration, wrapper, or plugin; direct shell access to the victim is not established as a requirement
- Trigger point: The victim invokes
fzf-tmuxwith the supplied layout or geometry values - Why exploitation is possible: Layout values are evaluated by Bash arithmetic before validation, and geometry values are incorporated into an unquoted tmux option string
Why this happens
The script processes externally influenced option values in contexts where shell and tmux syntax can be interpreted. In Bash arithmetic expansion, crafted operands can trigger command substitution; separately, assembling an unquoted tmux option string allows spaces to alter its argument structure. This is an OS command injection weakness associated with CWE-78: Improper Neutralization of Special Elements used in an OS Command.
Potential impact
- Commands may execute with the permissions of the invoking user
- Injected tmux flags could alter popup behavior or other option handling
- Affected user sessions or data accessible to the invoking account could be exposed or modified
- Further impact could occur if the invoking account has elevated privileges
General mitigation guidance
Defensive patterns include:
- Avoid evaluating externally influenced values as shell arithmetic expressions; parse and validate them as plain data first
- Pass subprocess arguments as distinct, quoted arguments rather than building command strings
- Allow only expected numeric formats and enforce sensible bounds for layout and geometry values
- Reduce trust in project configuration and plugin-provided settings, and avoid invoking wrappers from untrusted sources
- Prefer secure, built-in tmux functionality where it meets the use case
- Run commands with least privilege to limit consequences if input handling fails
How teams detect issues like this
- Use static analysis to identify untrusted values reaching Bash arithmetic expansion or unquoted command strings
- Review shell code that builds tmux arguments through string concatenation, especially for values containing spaces or shell metacharacters
- Add policy checks for unsafe shell expansions and require argument arrays or equivalent safe argument-passing patterns
- Inspect wrappers, plugins, and project configuration that can supply
fzf-tmuxoptions - Automated code review tools may help flag these patterns for manual assessment

