CVE-2023-22463: Github.com/KubeOperator/kubepi KubePi Allows Malicious Actor To Vulnerability
CRITICALCVE-2023-22463 is a CRITICAL (CVSS 9.8) kubepi allows malicious actor to vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Github.com/KubeOperator/kubepi libraries in the Go ecosystem. The issue involves kubepi allows malicious actor to login with a forged jwt token via hardcoded jwtsigkeys. Remediation is available by upgrading affected packages to version 1.6.3.
CVE-2023-22463 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-22463
To remediate this vulnerability, upgrade all affected Github.com/KubeOperator/kubepi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/KubeOperator/kubepi to 1.6.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/KubeOperator/kubepi
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-22463, inspect your project dependencies for Github.com/KubeOperator/kubepi:
inspect dependencies for github.com/KubeOperator/kubepi
Analyze the terminal output to locate any version of Github.com/KubeOperator/kubepi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-798: Use of Hard-coded Credentials, where the product contains hard-coded credentials, such as a password or cryptographic key. In Github.com/KubeOperator/kubepi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-22463 Affected Github.com/KubeOperator/kubepi Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/KubeOperator/kubepi
|
Go |
< 1.6.3
|
1.6.3
|
References
Frequently Asked Questions
What is CVE-2023-22463?
Which Github.com/KubeOperator/kubepi versions are affected?
What version fixes CVE-2023-22463?
Is github.com/KubeOperator/kubepi affected?
What is the CVSS score of CVE-2023-22463?
What CWE is associated with CVE-2023-22463?
How can I check Go dependencies for CVE-2023-22463?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vjhf-8vqx-vqpq",
"modified" : "2023-01-06T17:37:58Z",
"published" : "2023-01-06T17:37:58Z",
"aliases" : [ "CVE-2023-22463" ],
"summary" : "KubePi allows malicious actor to login with a forged JWT token via Hardcoded Jwtsigkeys",
"details" : "### Summary\nThe jwt authentication function of kubepi <= v1.6.2 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. \n\n### Details\n[`session.go`](https://github.com/KubeOperator/KubePi/blob/da784f5532ea2495b92708cacb32703bff3a45a3/internal/api/v1/session/session.go#L35), the use of hard-coded JwtSigKey allows an attacker to use this value to forge jwt tokens arbitrarily. The JwtSigKey is confidential and should not be hard-coded in the code.\n\n```golang\nvar JwtSigKey = []byte(\"signature_hmac_secret_shared_key\")\nvar jwtMaxAge = 10 * time.Minute\n\ntype Handler struct {\n\tuserService user.Service\n\troleService role.Service\n\tclusterService cluster.Service\n\trolebindingService rolebinding.Service\n\tldapService ldap.Service\n\tjwtSigner *jwt.Signer\n}\n```\n### Affected Version\n<= v1.6.2\n\n### Patches\nThe vulnerability has been fixed in [v1.6.3](https://github.com/KubeOperator/KubePi/releases/tag/v1.6.3).\n\nhttps://github.com/KubeOperator/KubePi/commit/3be58b8df5bc05d2343c30371dd5fcf6a9fbbf8b : JWT key can be specified in app.yml, if leave it blank a random key will be used.\n\n### Workarounds\nIt is recommended to upgrade the version to [v1.6.3](https://github.com/KubeOperator/KubePi/releases/tag/v1.6.3).\n\n### For more information\nIf you have any questions or comments about this advisory, please [open an issue](https://github.com/KubeOperator/KubePi/issues).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/KubeOperator/kubepi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.6.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/KubeOperator/KubePi/security/advisories/GHSA-vjhf-8vqx-vqpq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22463"
}, {
"type" : "WEB",
"url" : "https://github.com/KubeOperator/KubePi/commit/3be58b8df5bc05d2343c30371dd5fcf6a9fbbf8b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/KubeOperator/KubePi"
}, {
"type" : "WEB",
"url" : "https://github.com/KubeOperator/KubePi/blob/da784f5532ea2495b92708cacb32703bff3a45a3/internal/api/v1/session/session.go#L35"
}, {
"type" : "WEB",
"url" : "https://github.com/KubeOperator/KubePi/releases/tag/v1.6.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-798" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-06T17:37:58Z",
"nvd_published_at" : "2023-01-04T16:15:00Z"
}
}