/

CVE-2026-53545

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in Termix SSH Tunnels

CVE-2026-53545

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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 contains an OS command injection vulnerability in the SSH tunnel disconnection workflow, where user-controlled tunnel host fields are embedded in shell command patterns. An authenticated user who can edit a tunnel may cause arbitrary commands to run on the source SSH host with the privileges of the connected SSH account.

Affected context

The vulnerability occurs in Termix deployments that provide authenticated users with the ability to edit SSH tunnel host fields. During tunnel teardown, values such as the endpoint port, source port, endpoint username, and endpoint IP may be incorporated into a shell command without adequate separation from shell syntax. Risk is present when these values can contain shell metacharacters and the disconnect operation executes the resulting command on the source SSH host.

Exploit preconditions

  • Attack surface: Authenticated Termix web interface and SSH tunnel management API
  • Required access: An authenticated account permitted to edit an SSH tunnel host field
  • Trigger point: SSH tunnel disconnection or teardown
  • Execution context: Commands run on the source SSH host under the connected SSH account
  • Why exploitation is possible: User-controlled values are interpolated into single-quoted pkill -f command patterns, allowing quote termination and additional shell syntax to be interpreted

Why this happens

The underlying bug is command construction through string interpolation. Values originating from editable tunnel configuration are inserted directly into a shell command rather than being passed as isolated arguments through a non-shell process interface or safely encoded for the intended operation. A crafted single quote can terminate the expected pattern and alter command interpretation, which maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker could execute arbitrary commands on the source SSH host.
  • The connected SSH account's files, credentials, and services may be exposed or modified.
  • The attacker could alter tunnel configuration or disrupt managed systems.
  • Compromise could enable lateral movement if the SSH account has broader network access.
  • Data could be destroyed, tampered with, or exfiltrated.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from process management operations and reducing trust in tunnel configuration fields.

Common defensive patterns include:

  • Invoking process-management functions without an intermediate shell.
  • Passing dynamic values as discrete, validated arguments rather than interpolated command strings.
  • Applying strict allowlists and type validation to ports, usernames, addresses, and tunnel identifiers.
  • Rejecting shell metacharacters and unexpected delimiters where the data format does not require them.
  • Running SSH connections with dedicated, least-privilege accounts and narrowly scoped permissions.
  • Limiting which users can create or modify tunnels and separating tunnel administration from general platform access.

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for shell execution APIs that receive concatenated or interpolated user input.
  • Code review checks for template strings, string formatting, or concatenation used to build process commands.
  • Tests that submit quote characters and other shell metacharacters to every tunnel configuration field.
  • Runtime monitoring for unexpected child processes launched during SSH tunnel teardown.
  • Audit policies requiring non-shell process invocation and allowlisted validation for command arguments.
  • Automated security review tools can help identify command construction patterns, but findings should be validated against the actual execution path.

Sources

SourceLink
github.comgithub.com/Termix-SSH/Termix/commit/52f4e51ae03b5b8d2608e1383e2ccf79d290132b
github.comgithub.com/Termix-SSH/Termix/pull/874
github.comgithub.com/Termix-SSH/Termix/releases/tag/release-2.3.2-tag
github.comgithub.com/Termix-SSH/Termix/security/advisories/GHSA-5p86-jgr7-4hwx

Frequently asked

questions

It can be exploitable through the Termix web interface or API when an authenticated user is allowed to edit a tunnel host field and later causes the tunnel to disconnect.

The attacker needs valid authentication and permission to modify the relevant SSH tunnel configuration. The resulting commands execute with the privileges of the connected SSH account.

Avoid shell-based command construction for tunnel teardown. Use a process API that does not invoke a shell, pass values as separate arguments, and enforce strict validation before execution.

Treat all editable tunnel fields as untrusted input, apply allowlist validation, use least-privilege SSH accounts, review process-spawning code, and monitor unexpected command execution during connection lifecycle events.

Find out what's already
exploitable in your codebase.