/

CVE-2026-45750

Severity:

CRITICAL RISK

(9.0)

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

CVE-2026-45750

Modified

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-639

Impact:

Remote Code Execution on Managed Servers

Severity:

CRITICAL RISK

(9.0)

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

The Termix File Manager's GET /ssh/file_manager/ssh/resolvePath endpoint previously embedded a user-supplied path parameter directly into a shell command executed over an active SSH session.

Because only double quotes were escaped and shell command substitution syntax like $(...) remained interpretable, an attacker could inject arbitrary commands into the remote shell when this endpoint was invoked.

Affected context

This vulnerability occurs in the Termix web-based server management platform, specifically within the File Manager component's SSH path resolution functionality.

It is relevant when:

  • Termix is used to manage remote servers over SSH
  • The /ssh/file_manager/ssh/resolvePath endpoint is accessible to the user (directly or via the UI)
  • The backend constructs shell commands using the path parameter and forwards them over an established SSH session

In such deployments, any feature that triggers path resolution on the remote host potentially exposes this injection point.

Exploit preconditions

  • Attack surface: HTTP interface of Termix, via GET /ssh/file_manager/ssh/resolvePath
  • Required access: Ability to invoke the endpoint with a controlled path parameter (typically an authenticated Termix user with File Manager access)
  • Trigger point: Backend processing of the path parameter to build a shell command sent through the existing SSH session
  • Why exploitation is possible: The application places the user-controlled path inside double quotes and escapes only double quotes.

Shell command substitution constructs (e.g., $(...) or backticks in some shells) are still evaluated by the remote shell, allowing injected commands to execute in the context of the managed server.

Why this happens

The underlying issue is the construction of shell commands from user input without robust, context-aware sanitization.

Instead of using parameterized or API-level file operations, the backend concatenates the path parameter into a command line and relies solely on escaping double quotes.

This pattern maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because shell metacharacters for command substitution are not neutralized and remain actionable to the remote shell.

The additional CWE-639 aspect highlights that access control at the application level may not sufficiently constrain which remote resources or sessions can be influenced by a crafted path value.

Potential impact

  • Remote execution of arbitrary shell commands on managed servers reachable via Termix
  • Unauthorized access to sensitive files and data on those servers
  • Installation of backdoors, malware, or persistence mechanisms
  • Lateral movement within the target environment using the compromised host as a pivot
  • Disruption of services by altering configurations or terminating critical processes
  • Possible escalation of privileges if combined with local privilege escalation vulnerabilities

General mitigation guidance

Effective mitigation centers on eliminating shell-based command construction from user input and tightening the trust boundary around remote operations.

Recommended defensive patterns include:

  • Avoid building shell commands with user-controlled values; instead, use language-native SSH and file APIs or libraries that do not invoke a shell.
  • When remote shell execution is unavoidable, strictly whitelist allowed operations and interpret user inputs as data only (e.g., validated path segments) rather than raw command fragments.
  • Normalize and validate paths against an expected format and scope (e.g., restricting to a configured root directory and rejecting metacharacters, command separators, and substitution syntax).
  • Apply least-privilege principles to the SSH accounts used by Termix, ensuring they have only the permissions necessary for management tasks.
  • Design endpoints so that users operate on logical resources (files, directories, sessions) identified by internal IDs rather than by direct shell-level paths, reducing the impact of CWE-639-style authorization issues.

How teams detect issues like this

Detection typically combines code-centric and behavior-centric approaches:

  • Static analysis: Configure rules to flag string interpolation or concatenation of HTTP parameters into shell command invocations (e.g., calls to system, exec, popen, or SSH wrappers that pass a full command line).
  • Code review: Look for back-end code that:
  • Accepts path or command-like parameters
  • Wraps them only in quotes without full shell escaping
  • Forwards them to remote shells instead of using structured APIs
  • Policy enforcement: Establish coding standards that prohibit shell invocation with untrusted input and require higher-level SSH/file APIs.
  • Runtime monitoring: Use logging and security tooling to detect anomalous command patterns, such as unexpected use of $(...), backticks, or command separators in commands initiated from the Termix application.
  • Automated tooling: Integrate SAST and DAST tools into CI/CD pipelines to surface OS command injection patterns and validate that HTTP endpoints do not allow shell metacharacters to control 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-v26q-rpv5-9m72

Frequently asked

questions

Yes. If an attacker can reach the Termix HTTP interface and invoke the vulnerable endpoint with a crafted path parameter, they can cause arbitrary commands to execute on the remote server over the existing SSH session, subject to Termix's authentication and access controls.

In typical deployments, the vulnerable endpoint is associated with authenticated File Manager functionality, so some level of access to Termix is usually required.

However, if the endpoint is exposed without proper authentication or if access controls are misconfigured, exploitation could be possible with minimal or no authentication.

Refactor the implementation so that file and path operations are performed through structured APIs (e.g., SSH libraries, RPC mechanisms, or direct file abstractions) that do not invoke a shell and do not interpolate user input into command strings.

Where shell use is unavoidable, strictly whitelist permissible commands and arguments and avoid passing raw user input directly to the shell.

Adopt a design principle that untrusted input is never used to build shell commands.

Enforce secure coding standards, use security-focused code review checklists, and integrate static analysis tools to flag shell invocation patterns.

Additionally, constrain features so users operate on abstracted resources rather than shell-level constructs, and apply robust authentication and authorization to management endpoints to limit the reach of any remaining flaws.

Find out what's already
exploitable in your codebase.