Summary
Unitree G1 EDU firmware through version 1.5.2 contains an unauthenticated remote code execution chain involving a WebRTC-to-DDS bridge, exposed cryptographic material, and path traversal in the knowledge upload API.
A network-adjacent attacker may execute arbitrary commands with root privileges when these weaknesses can be combined to influence the bashrunner service and its execution environment.
Affected context
The vulnerability occurs in Unitree G1 EDU deployments where the affected firmware exposes the WebRTC-to-DDS bridge on TCP port 9991, uses a statically stored AES key with overly broad read permissions, and provides the chat_go knowledge upload API. Risk depends on network reachability, service configuration, and whether the bashrunner process can access attacker-controlled files.
Exploit preconditions
- Attack surface: Network-accessible WebRTC-to-DDS bridge and chat_go knowledge upload API
- Required access: Network-adjacent connectivity; authentication is not required by the vulnerable service chain
- Trigger point: Processing of DDS control messages and execution of scripts by the bashrunner service
- Why exploitation is possible: Weak service authentication, exposed cryptographic material, and path traversal can allow attacker-controlled content to reach a privileged script execution context
Why this happens
The vulnerability results from multiple insecure design patterns operating together. A network-facing bridge accepts control messages without sufficient authentication, while a static AES key is stored with permissions that may allow unintended disclosure. Separately, the upload API fails to constrain resolved file paths to the intended directory, corresponding to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The control-plane weakness also relates to CWE-306: Missing Authentication for Critical Function, allowing sensitive service actions to be reached without establishing a trusted identity.
Potential impact
- An unauthenticated attacker could execute arbitrary commands
- Commands may run with root-level privileges
- The robot runtime and connected services could be compromised
- Attackers could alter robot behavior or operational data
- Credentials, device information, or other local data could be exposed
- Compromise could support lateral movement into reachable networks or systems
General mitigation guidance
Mitigation generally focuses on separating control-plane access from untrusted networks and removing unsafe file and privilege assumptions.
Common defensive patterns include:
- Requiring strong authentication and authorization for WebRTC, DDS, and administrative control functions
- Replacing static shared keys with protected, rotated credentials and minimizing key readability
- Canonicalizing uploaded paths and enforcing confinement within an approved storage directory
- Using allowlisted file types and rejecting symbolic-link or traversal-based escapes
- Running script-processing services with least privilege rather than root permissions
- Separating upload, control, and execution capabilities across security boundaries
- Restricting access to exposed ports through network segmentation and firewall policy
How teams detect issues like this
Detection programs can combine source review, runtime monitoring, and configuration policy checks.
Useful approaches include:
- Static analysis for path construction using untrusted input without canonicalization or directory-boundary checks
- Code review of upload handlers, subprocess creation, and service-control endpoints
- Policy checks for world-readable cryptographic keys and credentials
- Network monitoring for unauthenticated control traffic to TCP port 9991
- Audit records for unexpected file creation, service restarts, and root-level child processes
- Automated review tools that flag missing authentication on critical functions and unsafe path handling

