Skip to content

Arbitrary Command Execution in File Manager

Critical
ZacharyZcR published GHSA-v26q-rpv5-9m72 May 31, 2026

Package

npm termix (npm)

Affected versions

<= 2.1.0

Patched versions

>=2.3.2

Description

Summary

The GET /ssh/file_manager/ssh/resolvePath endpoint in the Termix File Manager component unsafely processes the path parameter and embeds it into a shell command executed over the active SSH session. Because the user-controlled value is placed inside double quotes and only double quotes are escaped, shell command substitution syntax such as $(...) is still interpreted by the remote shell.

Details

The vulnerable handler receives sessionId and path from the query string, applies only double-quote escaping, and then builds a shell command using user-controlled input:

const escapedPath = expandPath.replace(/"/g, '\\"');
const command = `echo "${escapedPath}"`;
sshConn.client.exec(command, ...);

Command substitution remains active inside double quotes in shell. As a result, escaping only " does not neutralize payloads such as $(id), which are still evaluated by the remote shell before echo processes the value.

PoC

Request sent:

GET /ssh/file_manager/ssh/resolvePath?sessionId=1&path=x%24(id) HTTP/1.1
Host: 192.168.1.26:8080
Referer: http://192.168.1.26:8080/
Cookie: [redacted]
Accept: application/json

Observed response:

{"resolvedPath":"xuid=0(root) gid=0(root) groups=0(root)"}

Impact

Any authenticated user with access to File Manager can execute arbitrary commands on the remote host associated with the vulnerable SSH session.
Additionally, the impact is further amplified by a separate Broken Access Control issue related to sessionId. If an attacker replaces the sessionId with the active session identifier of another user, the same command injection can be redirected toward that user’s remote VPS. In that scenario, the issue no longer affects only the attacker’s own session and instead enables command execution against third-party remote infrastructure within the same Termix instance.

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

CVE ID

CVE-2026-45750

Weaknesses

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. Learn more on MITRE.

Authorization Bypass Through User-Controlled Key

The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. Learn more on MITRE.

Credits