/

CVE-2026-53542

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in Termix Archive Creation

CVE-2026-53542

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Command Execution on the Managed SSH Host

Severity:

HIGH RISK

(8.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 argument-injection flaw in its archive creation endpoint, where selected file names can be interpreted as GNU tar options instead of ordinary operands. A user with access to an SSH file-manager session may cause commands to run on the managed SSH host with the privileges of the connected SSH account.

Affected context

The vulnerability occurs in Termix deployments that use the SSH file manager to create tar-based archives. It becomes risky when users can select files whose basenames begin with option-like characters and the archive-building logic passes those names to tar without an end-of-options marker or an unambiguous relative-path representation.

Exploit preconditions

  • Attack surface: The SSH file-manager archive creation endpoint
  • Required access: An authenticated user with access to an SSH file-manager session
  • Trigger point: Creation of a tar, tar.gz, tar.bz2, or tar.xz archive from selected files
  • Why exploitation is possible: Selected basenames are passed to tar as ambiguous command-line operands, allowing specially named files to be interpreted as options and associated actions

Why this happens

The underlying bug is unsafe construction of a command-line argument list for an archive utility. File names are treated as trusted operands even though they may begin with option prefixes, allowing tar to reinterpret attacker-influenced names as command-line options and execute configured actions.

This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, specifically the failure to preserve the intended distinction between data values and command-line syntax.

Potential impact

  • An attacker may execute commands on the managed SSH host
  • Files accessible to the connected SSH account could be disclosed or modified
  • Services or application data may be disrupted
  • Credentials, configuration files, or private keys accessible to that account could be exposed
  • The affected host could be used for further lateral movement, depending on account privileges

General mitigation guidance

Mitigation generally focuses on ensuring that user-controlled file names remain data rather than command-line syntax.

Common defensive patterns include:

  • Use a safe process-execution API with structured argument arrays rather than shell-interpolated command strings
  • Terminate command-line option parsing before supplying user-controlled paths
  • Represent selected paths as unambiguous relative or absolute operands
  • Validate and constrain file selections against the intended SSH directory and authorization policy
  • Prefer archive-library APIs that do not invoke external command-line utilities where practical
  • Run connected SSH accounts with the minimum filesystem and service privileges required
  • Apply filesystem, process, and network restrictions to reduce the impact of command execution

How teams detect issues like this

Detection can combine source review, automated analysis, and runtime monitoring:

  • Search for archive utility invocations that concatenate or append user-controlled file names without an end-of-options marker
  • Review process-spawning code for shell execution, string-based command construction, and insufficient argument separation
  • Add static-analysis or linting rules for unsafe tar invocation patterns and unchecked path operands
  • Test archive workflows with option-like file names as part of security-focused regression testing
  • Monitor SSH hosts for unexpected tar child processes, unusual command execution, or file changes by service accounts
  • Enforce repository policies requiring structured process APIs and explicit validation of file paths

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-rwj6-6vh7-45pv

Frequently asked

questions

It can be triggered through the web application by a user who has access to an SSH file-manager session. The resulting commands execute on the managed SSH host rather than necessarily on the Termix server.

The attacker needs an authorized session with permission to use the relevant SSH file-manager and archive functionality. The impact is bounded in part by the privileges of the connected SSH account.

Treat selected file names as data, use structured process arguments or an archive library, terminate option parsing before user-controlled operands, and enforce directory and authorization constraints.

Review every external-command integration for argument ambiguity, add regression tests using option-like file names, apply static-analysis checks, and operate SSH connections with least privilege.

Find out what's already
exploitable in your codebase.