Kubepi · Kubepi · CVE-2023-22463
**Name of the Vulnerable Software and Affected Versions**
KubePi versions prior to 1.6.3
**Description**
The jwt authentication function of KubePi uses hard-coded Jwtsigkeys, resulting in the same Jwtsigkeys for all online projects. This means that an attacker can forge any jwt token to take over the administrator account of any online project. Furthermore, they may use the administrator to take over the k8s cluster of the target enterprise. The `session.go` file uses a hard-coded `JwtSigKey`, allowing an attacker to use this value to forge jwt tokens arbitrarily. The `JwtSigKey` is confidential and should not be hard-coded in the code.
**Recommendations**
For versions prior to 1.6.3, upgrade to version 1.6.3 or later, where the JWT key can be specified in app.yml, and if left blank, a random key will be used. As a temporary workaround, consider restricting access to the `session.go` file and the `JwtSigKey` variable until a patch is available. Avoid using the hard-coded `JwtSigKey` value in the affected API endpoints until the issue is resolved.