CVE-2024-43403: Withdrawn Advisory Kanister Vulnerable To Cluster-level Privilege Vulnerability

MODERATE
Advisory Identifier: GHSA-h27c-6xm3-mcqp
CVSS 8.8
CWE-269
Published
Advisory Summary

CVE-2024-43403 is a MODERATE (CVSS 8.8) kanister vulnerable to cluster-level privilege vulnerability (CWE-269: Improper Privilege Management) affecting Withdrawn Advisory libraries in the Go ecosystem. The issue involves kanister vulnerable to cluster-level privilege escalation. Remediation is available by upgrading affected packages to version 0.0.0-20240926084453-1f40f03d8432.

CVE-2024-43403 at a Glance

CVE Identifier CVE-2024-43403
GHSA Identifier GHSA-h27c-6xm3-mcqp
Severity MODERATE
CVSS v3.1 Base Score 8.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Withdrawn Advisory
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-43403

To remediate this vulnerability, upgrade all affected Withdrawn Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/kanisterio/kanister fixed: 0.0.0-20240926084453-1f40f03d8432
Upgrade github.com/kanisterio/kanister to 0.0.0-20240926084453-1f40f03d8432
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/kanisterio/kanister

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-43403, inspect your project dependencies for Withdrawn Advisory:

inspect dependencies for github.com/kanisterio/kanister

Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20240926084453-1f40f03d8432), 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Withdrawn Advisory, 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

# Withdrawn Advisory This advisory has been withdrawn because the vulnerability does not affect a released Go package. For more information, see github/advisory-database/issues/5029. # Original Advisory ### Summary This advisory affects the Kanister helm charts and not the go package ### Details The kanister has a deployment called default-kanister-operator, which is bound with a ClusterRole called edit via ClusterRoleBinding(https://github.com/kanisterio/kanister/blob/master/helm/kanister-operator/templates/rbac.yaml#L49). The "edit" ClusterRole is one of Kubernetes default-created ClusterRole, and it have create/patch/udpate verbs of daemonset resources, create verb of serviceaccount/token resources, and impersonate verb of serviceaccounts resources. If a malicious user can access the worker node which has this component, he/she can: For the create/patch/update verbs of daemonset resources, the malicious user can abuse it to create or modify a set of Pods to mount a high-privilege service account (e.g., the cluster-admin service account). After that, he/she can abuse the high-privilege SA token of created Pod to take over the whole cluster. For the create verb of serviceaccount/token resources, a malicious user can abuse this permission to generate new Service Account tokens and use them to operate with high-privilege roles, such as cluster administrators. These tokens can be used to access and manipulate any resources within the cluster. For the impersonate verb of serviceaccounts resources, a malicious user can impersonate high-privilege Service Accounts, thereby gaining access to roles such as cluster administrators. This enables the attacker to perform all actions that the high-privilege account can, including creating, modifying, and deleting critical resources within the cluster. ### PoC We have discussed in the "Details" section ### Impact Privilege escalation ### Mitigation Currently kanister helm chart provides rbac.create flag (true by default), which controls whether the rbac rules for kanister service account will be created https://github.com/kanisterio/kanister/blob/master/helm/kanister-operator/values.yaml#L17 If this value set to false, the user needs to create rbac rules themselves and they can limit the role bindings for kanister service account, for example scope it to specific namespace. Service account can also be configured via helm https://github.com/kanisterio/kanister/blob/master/helm/kanister-operator/values.yaml#L19

CVE-2024-43403 Affected Withdrawn Advisory Versions

1 component(s)
Fixed Versions:
0.0.0-20240926084453-1f40f03d8432
Product / Package Ecosystem Affected Versions Fixed Version
github.com/kanisterio/kanister
Go
< 0.0.0-20240926084453-1f40f03d8432
0.0.0-20240926084453-1f40f03d8432

References

Frequently Asked Questions

What is CVE-2024-43403?
CVE-2024-43403 is a security vulnerability in Withdrawn Advisory involving Kanister vulnerable to cluster-level privilege escalation under CWE-269: Improper Privilege Management.
Which Withdrawn Advisory versions are affected?
Affected versions include releases prior to 0.0.0-20240926084453-1f40f03d8432 across affected packages: github.com/kanisterio/kanister.
What version fixes CVE-2024-43403?
Upgrading to 0.0.0-20240926084453-1f40f03d8432 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/kanisterio/kanister affected?
Yes, github.com/kanisterio/kanister is affected in releases prior to 0.0.0-20240926084453-1f40f03d8432. Upgrade your dependency to 0.0.0-20240926084453-1f40f03d8432 or later.
What is the CVSS score of CVE-2024-43403?
CVE-2024-43403 has a CVSS v3.1 base score of 8.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-43403?
CVE-2024-43403 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2024-43403?
Run the dependency tree command: 'inspect dependencies for github.com/kanisterio/kanister'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h27c-6xm3-mcqp",
  "modified" : "2024-11-25T20:50:10Z",
  "published" : "2024-08-20T22:13:02Z",
  "withdrawn" : "2024-11-25T20:50:10Z",
  "aliases" : [ "CVE-2024-43403" ],
  "summary" : "Withdrawn Advisory: Kanister vulnerable to cluster-level privilege escalation",
  "details" : "# Withdrawn Advisory\n\nThis advisory has been withdrawn because the vulnerability does not affect a released Go package. For more information, see github/advisory-database/issues/5029.\n\n# Original Advisory\n\n### Summary\nThis advisory affects the Kanister helm charts and not the go package\n\n### Details\nThe kanister has a deployment called default-kanister-operator, which is bound with a ClusterRole called edit via ClusterRoleBinding(https://github.com/kanisterio/kanister/blob/master/helm/kanister-operator/templates/rbac.yaml#L49). The \"edit\" ClusterRole is one of Kubernetes default-created ClusterRole, and it have create/patch/udpate verbs of daemonset resources, create verb of serviceaccount/token resources, and impersonate verb of serviceaccounts resources. If a malicious user can access the worker node which has this component, he/she can:\n\nFor the create/patch/update verbs of daemonset resources, the malicious user can abuse it to create or modify a set of Pods to mount a high-privilege service account (e.g., the cluster-admin service account). After that, he/she can abuse the high-privilege SA token of created Pod to take over the whole cluster.\n\nFor the create verb of serviceaccount/token resources, a malicious user can abuse this permission to generate new Service Account tokens and use them to operate with high-privilege roles, such as cluster administrators. These tokens can be used to access and manipulate any resources within the cluster.\n\nFor the impersonate verb of serviceaccounts resources, a malicious user can impersonate high-privilege Service Accounts, thereby gaining access to roles such as cluster administrators. This enables the attacker to perform all actions that the high-privilege account can, including creating, modifying, and deleting critical resources within the cluster.\n\n\n### PoC\nWe have discussed in the \"Details\" section\n\n### Impact\nPrivilege escalation\n\n### Mitigation\n\nCurrently kanister helm chart provides rbac.create flag (true by default), which controls whether the rbac rules for kanister service account will be created https://github.com/kanisterio/kanister/blob/master/helm/kanister-operator/values.yaml#L17\nIf this value set to false, the user needs to create rbac rules themselves and they can limit the role bindings for kanister service account, for example scope it to specific namespace.\nService account can also be configured via helm https://github.com/kanisterio/kanister/blob/master/helm/kanister-operator/values.yaml#L19\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kanisterio/kanister"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20240926084453-1f40f03d8432"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kanisterio/kanister/security/advisories/GHSA-h27c-6xm3-mcqp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-43403"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kanisterio/kanister"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kanisterio/kanister/blob/master/helm/kanister-operator/templates/rbac.yaml#L49"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kanisterio/kanister/wiki/2023%E2%80%9024-Community-Meeting-Notes"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-20T22:13:02Z",
    "nvd_published_at" : "2024-08-20T22:15:04Z"
  }
}