Summary
CyberPanel versions before 3.0.0 use a hard-coded secret to sign JWTs for the WebTerminal FastAPI SSH service. An unauthenticated remote attacker may forge authentication tokens and obtain an interactive root shell through the WebSocket service exposed on port 8888.
Affected context
The vulnerability occurs in CyberPanel deployments before version 3.0.0 where the WebTerminal FastAPI SSH service uses a secret embedded in the application for JWT signing. When the service is reachable over the network and trusts tokens signed with that fixed secret, attackers may bypass normal authentication and access the terminal with elevated privileges.
Exploit preconditions
- Attack surface: WebTerminal WebSocket service exposed on port 8888
- Required access: Network connectivity to the service; no valid user credentials are required
- Trigger point: JWT authentication performed when establishing a WebSocket terminal session
- Why exploitation is possible: The service uses a predictable, hard-coded signing secret and accepts attacker-controlled authentication claims, allowing forged tokens to be treated as valid
Why this happens
The underlying flaw is the embedding and reuse of a security-sensitive JWT signing secret in application code or otherwise fixed deployment logic. This maps to CWE-798: Use of Hard-coded Credentials, because knowledge of the static secret can enable authentication bypass across affected installations. Trusting forged identity and privilege claims after signature validation further increases the impact when those claims can select a root-level terminal session.
Potential impact
- An unauthenticated attacker may obtain an interactive root shell
- Attackers could execute arbitrary commands on the CyberPanel host
- Sensitive files, credentials, and hosted application data may be accessed
- System configuration and hosted services may be altered or disrupted
- The host could be used for lateral movement or additional compromise
General mitigation guidance
Mitigation generally focuses on removing hard-coded authentication material and strengthening the token trust boundary.
Common defensive patterns include:
- Generate unique, high-entropy signing keys per deployment and store them in protected secret-management systems
- Rotate signing keys and invalidate tokens issued under compromised or obsolete keys
- Enforce strict validation of token issuer, audience, algorithm, expiration, and privilege claims
- Avoid allowing client-controlled claims to select privileged operating-system identities
- Restrict WebTerminal exposure to trusted management networks or authenticated gateways
- Run terminal services with the minimum operating-system privileges required
- Monitor and limit administrative WebSocket access
How teams detect issues like this
Organizations can identify related weaknesses through:
- Static analysis searches for JWT signing keys, passwords, or credential-like constants embedded in source code
- Code review checks for fixed secrets, weak secret-generation practices, and unrestricted privilege claims
- Dependency and configuration policy rules requiring external secret storage and key rotation
- Runtime monitoring for unexpected WebSocket connections to administrative terminal services
- Authentication telemetry identifying token validation anomalies, unusual administrative sessions, or access from untrusted networks
Automated security review tools may help flag hard-coded credentials and insecure authentication patterns, but findings should be validated against deployment configuration.

