Summary
Termix, a web-based server management platform, contains an authorization flaw in 16 file-manager endpoints that fail to verify ownership of SSH sessions identified by sessionId.
An authenticated attacker who can guess or observe another user's active sessionId may gain full file management capabilities on the victim's connected SSH host, including reading, modifying, deleting, downloading, and executing files.
Affected context
The vulnerability arises in Termix deployments where multiple users manage SSH sessions through the web interface.
Affected instances expose file-manager operations via HTTP endpoints that take a sessionId parameter to identify the backend SSH connection.
In vulnerable versions, these endpoints do not reliably confirm that the caller is the owner of the referenced SSH session, enabling cross-session access within the same Termix instance under certain conditions.
Exploit preconditions
- Attack surface: HTTP(S) API and web UI file-manager endpoints in the Termix application.
- Required access: Valid authenticated Termix account on the same instance as the target user.
- Knowledge/guessing requirement: Ability to know, infer, or brute-force a victim's active
sessionIdvalue (e.g., through predictable identifiers, observation, logging artifacts, or weak entropy). - Trigger point: Sending requests to file-manager endpoints (e.g., read, write, delete, download, execute) that include a victim's
sessionId. - Why exploitation is possible: The server-side logic authorizes file-manager operations solely based on the provided
sessionId, without verifying that the session belongs to the requesting principal, violating object-level authorization expectations.
Why this happens
This is a broken access control issue specifically mapped to CWE-639: Authorization Bypass Through User-Controlled Key.
The application exposes sessionId as an externally controllable identifier for SSH sessions and uses it as the primary key for file-manager operations.
Instead of binding the SSH session to the authenticated user and enforcing that relationship on every request, the server trusts any sessionId value provided by a logged-in user.
This pattern effectively turns sessionId into an insecure direct object reference, allowing attackers to act on resources they do not own whenever they can supply another user's session identifier.
Potential impact
- Unauthorized reading of files on a victim's connected SSH host.
- Unauthorized modification, creation, and deletion of files on the victim's host.
- Unauthorized download of sensitive data from the victim's system through the Termix interface.
- Execution of files or commands via file-manager-related functionality on the victim's remote host.
- Potential lateral movement inside the victim's infrastructure if the compromised SSH session has broad privileges.
- Escalation of impact to data exfiltration, service disruption, or deployment of malicious tools on managed servers.
General mitigation guidance
Effective mitigation focuses on strong per-object authorization and session binding:
- Bind each SSH
sessionIdto the authenticated user (or account/tenant) that created it and store this relationship server-side. - On every file-manager endpoint, enforce an authorization check that confirms the current user is allowed to operate on the referenced
sessionId. - Avoid relying solely on client-supplied identifiers for security decisions; treat them as lookups that must be validated against server-side ownership and role rules.
- Apply least-privilege principles to SSH sessions and file-manager capabilities (e.g., scoping access to specific directories or roles).
- Centralize access control logic so that adding new endpoints or operations automatically inherits consistent authorization checks.
- Consider rate limiting and monitoring around
sessionIdusage to reduce the feasibility of guessing attacks and to surface abnormal patterns.
How teams detect issues like this
Detection can combine code-level review with runtime monitoring:
- Static analysis / code review:
- Look for endpoints that accept
sessionIdor similar identifiers and ensure they perform explicit checks linking the identifier to the authenticated user. - Flag patterns where business logic trusts user-controlled keys as the sole condition for accessing resources.
- Review controller and service methods for shared authorization middleware; endpoints that bypass or duplicate this logic warrant extra scrutiny.
- Automated tooling:
- Configure SAST rules to detect common IDOR patterns (e.g., direct use of query/path parameters in data lookups without user scoping).
- Use DAST or API security scanners to fuzz
sessionIdparameters and observe whether cross-user access is possible. - Operational monitoring:
- Log file-manager requests along with authenticated user identity and
sessionId, and alert on patterns where one user accesses many different session identifiers. - Track anomalies such as repeated 4xx/5xx responses when random
sessionIdvalues are used, which may indicate probing.

