CVE-2026-121548
Description
A flaw was found in nnn. The togglex plugin fails to properly sanitize filenames before passing them to a system command. A local attacker can exploit this flaw by placing a file with a specially crafted name in a directory, leading to arbitrary command execution with the privileges of the user invoking the plugin.
Statement
Red Hat Product Security has determined that this vulnerability does not affect any currently supported Red Hat product. This assessment may evolve based on further analysis and discovery. For more information about this vulnerability and the products it affects, please see the linked references.
Mitigation
--- CME Mitigation Guidance (2026-11-06) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.
The highest-value action is to refactor the togglex plugin to execute commands directly via argv arrays instead of interpolating filenames into an inline shell string with xargs: upgrade to the fixed Nnn builds, which apply the documented input check, closing crafted filenames with shell metacharacters. Until patched, this is a concern on Linux systems where users run nnn and invoke the togglex plugin in directories containing untrusted files, so Avoid invoking the togglex plugin on untrusted directories and prevent untrusted users from placing files in working directories. As a compensating measure, Log execve syscalls and process execution via auditd to capture commands executed by the shell, Sanitize quotes and shell metacharacters in filenames before passing them to xargs and downstream shell commands, Run SELinux in enforcing mode to restrict actions and system access of spawned processes, Apply SELinux confined user mappings to restrict invoking sessions and limit lateral movement, Monitor via EDR agents to detect anomalous child processes and suspicious shell execution under the nnn process tree, and Use Falco or eBPF runtime security to detect anomalous shell invocations and unauthorized process spawning from nnn and xargs. These controls limit blast radius and contain exploitation, but they do not fix the underlying command injection defect — apply the upstream patch to fully remediate.
Highest-impact CME: CME-1307 Command Injection Prevention (No Shell Invocation) (high)
Understanding the Weakness (CWE)
Confidentiality,Integrity,Availability,Non-Repudiation
Technical Impact: Execute Unauthorized Code or Commands; DoS: Crash, Exit, or Restart; Read Files or Directories; Modify Files or Directories; Read Application Data; Modify Application Data; Hide Activities
Attackers could execute unauthorized operating system commands, which could then be used to disable the product, or read and modify data for which the attacker does not have permissions to access directly. Since the targeted application is directly executing the commands instead of the attacker, any malicious activities may appear to come from the application or the application's owner.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.