/

CVE-2026-45744

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Termix SSH File Manager Path Resolution

CVE-2026-45744

Modified

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution on Managed Hosts

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Termix's SSH file manager resolvePath endpoint constructs shell commands using insufficient quoting, allowing injected command substitutions like $(...) and backticks to be executed.

Any authenticated user with an active SSH File Manager session can abuse this to run arbitrary commands on the remote host connected through Termix.

Affected context

The vulnerability appears in Termix deployments where:

  • The SSH File Manager feature is enabled and in active use
  • The /ssh/file_manager/ssh/resolvePath endpoint is exposed to authenticated users
  • Path resolution for remote file operations is implemented by composing and executing shell commands on the remote host

The risk is present when user-controlled path or related parameters are interpolated into shell commands with only double-quote escaping, without neutralizing command substitution syntax.

Exploit preconditions

  • Attack surface: Authenticated web interface of Termix, specifically the SSH File Manager's resolvePath endpoint.
  • Required access: Valid Termix account and an established SSH File Manager session to a target server.
  • User interaction: The attacker must supply crafted input values (e.g., paths) that are forwarded into the shell command executed on the remote host.
  • Trigger point: Execution of the backend logic handling GET /ssh/file_manager/ssh/resolvePath, which constructs and runs a shell command for path resolution.
  • Why exploitation is possible: The server relies on double-quote escaping when building shell commands, but does not prevent command substitution via $(...) or backticks, so those constructs are interpreted by the shell and executed with the privileges of the SSH session.

Why this happens

This issue stems from constructing shell commands through string concatenation that includes user-controlled data, and relying solely on double-quote escaping to ensure safety.

In POSIX shells, double quotes still allow command substitution, so user input that includes $(...) or backticks is evaluated by the shell at runtime.

This behavior aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command, where input is insufficiently sanitized before being used to build OS-level commands.

Instead of treating the path purely as data, the implementation embeds it in a command string interpreted by the shell, creating an injection point whenever untrusted input reaches that command without robust neutralization or use of safer invocation primitives.

Potential impact

  • Arbitrary command execution on the remote host connected via Termix
  • Compromise of the managed server, including reading, modifying, or deleting files
  • Installation of backdoors, malware, or persistence mechanisms on remote systems
  • Lateral movement from the compromised host to other systems in the same environment
  • Exfiltration of sensitive data accessible to the SSH account used by Termix

General mitigation guidance

Effective mitigation focuses on eliminating shell-based command construction paths and treating all user-provided values as untrusted data:

  • Replace shell command composition with direct API or library calls (e.g., filesystem operations) that do not invoke a shell.
  • When command-line tools must be used, invoke them via parameterized process-spawning APIs that pass arguments as arrays rather than strings.
  • Avoid relying on quoting or manual escaping for safety; if a shell is unavoidable, use strict whitelisting of expected characters and reject or normalize unexpected constructs like command substitution.
  • Separate the roles of user input and command templates by clearly delimiting which parts are data and ensuring only trusted, validated data can influence execution.
  • Run Termix-managed SSH sessions and helper processes with least-privilege accounts to reduce the blast radius if command injection occurs.

How teams detect issues like this

Detecting this class of issue typically involves a combination of code-level and behavioral analysis:

  • Static analysis: Configure rules to flag any use of shell-invoking APIs (e.g., exec, system, popen, or language-specific wrappers) where user-controlled variables are concatenated into command strings.
  • Code review: During review, look for features that perform remote operations by building shell commands, especially around file management and path resolution, and verify that they use safe process invocation patterns.
  • Security testing: Implement targeted tests or fuzzing against endpoints like /ssh/file_manager/ssh/resolvePath, supplying inputs with common shell metacharacters and command substitution syntax to validate that they are rejected or treated as data.
  • Runtime monitoring: Use logging and monitoring on managed hosts to detect unusual commands executed via the Termix account, including patterns that suggest scripted or chained command execution.

Sources

SourceLink
github.comgithub.com/Termix-SSH/Termix/releases/tag/release-2.3.2-tag
github.comgithub.com/Termix-SSH/Termix/security/advisories/GHSA-37f4-wq95-pg33

Frequently asked

questions

Exploitation is limited to authenticated users of Termix who can establish SSH File Manager sessions; it is not directly accessible to unauthenticated external attackers, but any user with such access can leverage it against connected hosts.

The attacker needs a valid Termix account and the ability to open or reuse an SSH File Manager session to a target server. Once connected, they can craft inputs that result in commands being executed under the privileges of the SSH account used by Termix.

The safest pattern is to remove shell command construction entirely for file operations, instead using language-native filesystem APIs or process execution functions that accept argument arrays and do not invoke a shell. If a shell cannot be avoided, strictly validate and constrain all input that reaches the command, rejecting any shell special characters and command substitution constructs.

Adopt a development guideline that prohibits concatenating untrusted input into command strings, enforce static analysis rules for shell invocation points, and require security reviews for features that interact with remote shells or OS-level commands. Embedding these rules into CI pipelines and code review checklists helps ensure new endpoints follow safer patterns by default.

Find out what's already
exploitable in your codebase.