Summary
Termix's web-based File Manager contained a critical broken access control issue where the backend trusted a client-supplied sessionId without confirming ownership by the authenticated user.
By manipulating this identifier, an attacker could hijack another user's active File Manager session, gaining unauthorized SSH-level access to that user's remote VPS filesystem and enabling arbitrary command execution.
Affected context
This vulnerability arises in Termix deployments where:
- The File Manager feature is used to manage files over SSH on remote VPS instances
- Active file management sessions are referenced by a
sessionIdparameter - The backend accepts this
sessionIddirectly from client requests and uses it to bind to an existing session
In such environments, any user with access to the Termix interface could potentially target other users' active File Manager sessions if session identifiers are predictable or discoverable.
Exploit preconditions
- Attack surface: HTTP(S) endpoints backing the Termix File Manager feature.
- Required access: Valid access to the Termix application (e.g., as any authenticated user) plus the ability to send crafted requests with manipulated
sessionIdvalues. - Trigger point: Any File Manager operation (e.g., open directory, read file, write file, upload, execute) that relies on the provided
sessionIdto attach to an existing SSH-backed session. - Why exploitation is possible: The server trusts a client-controlled
sessionIdwithout confirming that it belongs to the current authenticated user, leading to horizontal privilege escalation (CWE-639) and broken authorization checks (CWE-284).
Why this happens
The core issue is an authorization design flaw where the backend uses a client-supplied session identifier as the sole basis for binding a request to an internal File Manager/SSH session.
Instead of deriving session ownership from authenticated context (e.g., user ID, server-side session), the code path assumes that any sessionId presented by the client is valid and belongs to the current user.
This maps to CWE-284 (Improper Access Control) and CWE-639 (Authorization Bypass Through User-Controlled Key), where object or session references are exposed and reused without ownership validation, enabling one user to operate on another user's active SSH-backed session.
Potential impact
- Unauthorized access to another user's remote VPS filesystem through their File Manager session
- Reading sensitive configuration files, credentials, or application data on the victim's VPS
- Modifying, uploading, or deleting files on the victim's remote server
- Executing arbitrary commands or scripts on the victim's VPS via exposed file execution capabilities
- Pivoting into additional systems if credentials or keys are discovered on the compromised VPS
- Disruption of services hosted on the affected VPS instances
General mitigation guidance
Effective mitigation focuses on enforcing strict server-side ownership checks and avoiding trust in client-controlled identifiers:
- Bind File Manager/SSH sessions to the authenticated user identity on the server side and verify that any requested
sessionIdbelongs to the current user before use. - Use non-guessable, opaque session identifiers stored and validated server-side, and never rely on them alone for authorization; always combine them with user context and role checks.
- Centralize authorization logic so all File Manager operations reuse the same, well-reviewed access control layer rather than ad hoc checks per endpoint.
- Apply least-privilege principles by scoping what each user's File Manager sessions can access, limiting the blast radius if a session is misused.
- Introduce defense-in-depth controls, such as per-user isolation of SSH credentials and filesystem namespaces, reducing cross-tenant impact if an access control flaw appears.
How teams detect issues like this
Detection efforts can target both code-level anti-patterns and runtime anomalies:
- Static analysis and code reviews should flag endpoints that:
- Accept user-controlled identifiers (e.g.,
sessionId) and use them directly to load resources or sessions. - Perform resource lookups without explicit checks tying the resource/session to the authenticated user.
- Security reviewers can search for patterns where object references (IDs, tokens) are passed from the client to the server and used in queries or lookups without filtering by user identity.
- Logging and monitoring can track File Manager operations by
sessionId, user ID, and target VPS; anomalies such as one user routinely acting on sessions created by another can indicate abuse. - Automated API security tests or fuzzers can systematically manipulate IDs in File Manager endpoints to confirm that access is restricted per user scope.

