Summary
Telepresence's Traffic Manager Tunnel endpoint can accept a caller-controlled session ID without verifying that the caller owns the active session. If an attacker obtains a valid session ID, they may attach a routed tunnel to that session and gain its network routing capabilities.
Telepresence's Traffic Manager Tunnel endpoint can accept a caller-controlled session ID without verifying that the caller owns the active session. If an attacker obtains a valid session ID, they may attach a routed tunnel to that session and gain its network routing capabilities.
Affected context
The issue occurs in the Traffic Manager Tunnel gRPC streaming endpoint when it parses a session ID from a caller-controlled message and uses that ID to access tunnel state without checking session ownership. Telepresence versions before 2.31.0 are affected. Exploitation depends on obtaining a valid active session ID; UUID4 identifiers make guessing one impractical.
The issue occurs in the Traffic Manager Tunnel gRPC streaming endpoint when it parses a session ID from a caller-controlled message and uses that ID to access tunnel state without checking session ownership. Telepresence versions before 2.31.0 are affected. Exploitation depends on obtaining a valid active session ID; UUID4 identifiers make guessing one impractical.
Exploit preconditions
- Attack surface: Traffic Manager Tunnel gRPC streaming endpoint
- Required access: A valid active session ID, potentially exposed through logs, cluster-internal channels, or the unauthenticated ArriveAsClient endpoint
- Trigger point: The endpoint processes the caller-controlled message and attaches a routed tunnel to the identified session
- Why exploitation is possible: The session ID is used to select active tunnel state without verifying that the caller is authorized to use that session
- Attack surface: Traffic Manager Tunnel gRPC streaming endpoint
- Required access: A valid active session ID, potentially exposed through logs, cluster-internal channels, or the unauthenticated ArriveAsClient endpoint
- Trigger point: The endpoint processes the caller-controlled message and attaches a routed tunnel to the identified session
- Why exploitation is possible: The session ID is used to select active tunnel state without verifying that the caller is authorized to use that session
Why this happens
The endpoint trusts a caller-supplied session identifier as a reference to active session state but does not enforce ownership or equivalent authorization checks. This is an insecure direct object reference pattern mapped to CWE-639: Authorization Bypass Through User-Controlled Key: possession of a key supplied by the caller is treated as sufficient authority to access the associated resource.
The endpoint trusts a caller-supplied session identifier as a reference to active session state but does not enforce ownership or equivalent authorization checks. This is an insecure direct object reference pattern mapped to CWE-639: Authorization Bypass Through User-Controlled Key: possession of a key supplied by the caller is treated as sufficient authority to access the associated resource.
Potential impact
- An attacker could attach a routed tunnel to another user's active session
- The attacker may gain the network routing capabilities of that session
- Systems reachable through the routed tunnel could be exposed to unauthorized access
- The incident could enable further access within the connected cluster or network, depending on available routes and permissions
- An attacker could attach a routed tunnel to another user's active session
- The attacker may gain the network routing capabilities of that session
- Systems reachable through the routed tunnel could be exposed to unauthorized access
- The incident could enable further access within the connected cluster or network, depending on available routes and permissions
General mitigation guidance
Defensive patterns focus on treating session identifiers as references, not credentials, and authorizing every operation against the authenticated caller's identity.
- Bind each session to an authenticated owner and verify that relationship when a tunnel is attached
- Avoid relying on unguessable identifiers as a substitute for authorization
- Reduce exposure of session identifiers in logs and internal channels, and restrict access to those sources
- Use authenticated, narrowly scoped access for endpoints that create or join sessions
- Apply least privilege to tunnel routing and the network destinations it can reach
Defensive patterns focus on treating session identifiers as references, not credentials, and authorizing every operation against the authenticated caller's identity.
- Bind each session to an authenticated owner and verify that relationship when a tunnel is attached
- Avoid relying on unguessable identifiers as a substitute for authorization
- Reduce exposure of session identifiers in logs and internal channels, and restrict access to those sources
- Use authenticated, narrowly scoped access for endpoints that create or join sessions
- Apply least privilege to tunnel routing and the network destinations it can reach
How teams detect issues like this
- Review code paths that accept caller-controlled identifiers and use them to retrieve or attach to session state
- Use static analysis or code review checks to flag resource lookups without ownership or authorization checks
- Monitor tunnel attachment events for mismatches between the authenticated caller and session owner
- Enforce policies requiring authorization checks on every session access and limiting routed network capabilities
- Review code paths that accept caller-controlled identifiers and use them to retrieve or attach to session state
- Use static analysis or code review checks to flag resource lookups without ownership or authorization checks
- Monitor tunnel attachment events for mismatches between the authenticated caller and session owner
- Enforce policies requiring authorization checks on every session access and limiting routed network capabilities

