Summary
Termix contains an authorization flaw in its terminal WebSocket that allows a low-privileged authenticated user to reference another user's SSH host configuration without demonstrating ownership or access. Under conditions where the victim's data key is unlocked, Termix may use the victim's stored credential to connect to an attacker-controlled SSH server and disclose password or private-key material.
Affected context
The issue occurs in Termix deployments where the terminal WebSocket accepts a user-controlled host configuration identifier and the host resolver permits owner-credential fallback without an explicit authorization check. The risk is present when a victim's stored SSH credentials are available to the application and an authenticated low-privileged user can influence the destination host, port, or username used for an outbound SSH connection.
Exploit preconditions
- Attack surface: Authenticated terminal WebSocket functionality
- Required access: A valid low-privileged Termix user account and the ability to submit terminal connection parameters
- Trigger point: Host resolution and SSH connection establishment
- Required victim condition: A victim's data key must be unlocked and stored SSH credentials must be available
- Why exploitation is possible: Authorization is not sufficiently tied to the supplied host configuration identifier, and owner credential fallback can combine another user's credential with attacker-controlled connection details
Why this happens
The underlying flaw is an object-level authorization failure mapped primarily to CWE-639: Authorization Bypass Through User-Controlled Key. The terminal workflow trusts a client-supplied host configuration identifier without verifying that the requester owns or may use the referenced object. A related CWE-862: Missing Authorization condition arises because the resolver can fall back to the configuration owner's credential rather than requiring an explicit access grant. This insecure pattern causes sensitive credentials to be used outside their intended authorization boundary.
Potential impact
- An attacker may cause Termix to authenticate to an attacker-controlled SSH service
- Stored SSH passwords or private-key material could be disclosed
- Victim credentials could be captured or replayed
- The attacker could gain unauthorized access to systems reachable with the disclosed credentials
- Confidentiality of managed infrastructure and user data could be compromised
General mitigation guidance
Mitigation generally focuses on enforcing object-level authorization throughout the terminal connection flow.
Common defensive patterns include:
- Verify that the requesting principal owns the host configuration or has an explicit, policy-controlled permission to use it
- Do not use owner credential fallback when the requester lacks an authorized credential relationship
- Bind credentials and connection destinations to server-side records rather than accepting independently controlled client values
- Validate and constrain destination, port, and username inputs according to deployment policy
- Minimize credential exposure through short-lived credentials, scoped keys, and least-privilege service permissions
- Keep sensitive data encrypted and require deliberate, auditable key-unlock operations
- Log authorization decisions and outbound SSH destinations without recording secret material
How teams detect issues like this
Detection approaches can include:
- Static analysis for resource lookups driven by client-supplied identifiers without adjacent ownership or permission checks
- Code review checks for fallback logic that substitutes an object's owner's secret for the requester's authorized credential
- Tests that attempt cross-user access to host configuration identifiers and verify denial before credential resolution
- Policy enforcement preventing outbound SSH connections to destinations not approved for the relevant tenant or user
- Runtime monitoring for unusual terminal connections, unexpected destination changes, and repeated authentication attempts involving shared infrastructure
- Neutral automated application-security and authorization testing tools can help identify missing object-level access controls

