T09 · Insecure Skill Coding Practices
- Location
scripts/relay-server/relay_server.py:201- Finding
Public Relay Exposes Message Traffic over Plaintext WebSockets
- Content
View full analysis
Vulnerability Details
File Location:
scripts/relay-server/relay_server.py:201-205
Vulnerability Type: Plaintext transmission of sensitive messages
Risk Level: HighVulnerable Code:
python server = await websockets.serve( self.handle_client, "0.0.0.0", self.port )Technical Analysis
The relay binds to every network interface and starts a WebSocket server without supplying a TLS
SSLContext. Consequently, the implementation supports plaintextws://transport rather than the securewss://transport claimed in the project documentation.HMAC signatures only provide limited message-integrity and authenticity properties; they do not encrypt message contents, sender and recipient identifiers, signatures, or connection metadata. The installation guide also instructs administrators to expose port 8765 through the firewall, making this weakness relevant to public deployments.
Attack Path
- An administrator deploys the relay on a public server and opens TCP port 8765 as documented.
- Agents connect directly to the relay through plaintext WebSockets.
- An attacker capable of observing network traffic, such as a hostile network operator or compromised router, captures WebSocket frames.
- The attacker reads relayed messages, sender and recipient identifiers, and authentication signatures.
- Captured signed send requests may also be replayed after relay restart because replay state is not persistent.
Impact Assessment
A network-positioned attacker can obtain the full contents and metadata of relayed communications. The attacker does not directly gain host privileges, but confidentiality is lost across every Agent using the affected relay. Captured traffic may facilitate replay attacks or further compromise if users transmit credentials or operational instructions through the service.
- Remediation
View remediation
Remediation Suggestions
- Require TLS by passing a securely configured
ssl.SSLContexttowebsockets.serve. - Alternatively, bind the relay only to a loopback or private interface and place it behind a correctly configured TLS reverse proxy.
- Reject plaintext production connections and update all examples to use
wss://. - Use valid certificates, modern TLS versions, and certificate verification on every client.
- Consider application-level encryption if the relay must not have access to message plaintext.
- Require TLS by passing a securely configured
