CVE-2024-45041: Github.com/external secrets/external secrets External Secrets Operator Vulnerable To Vulnerability

HIGH
Advisory Identifier: GHSA-qwgc-rr35-h4x9
CVSS 8.3
CWE-732 CWE-269
Published
Advisory Summary

CVE-2024-45041 is a HIGH (CVSS 8.3) external secrets operator vulnerable to vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Github.com/external secrets/external secrets libraries in the Go ecosystem. The issue involves external secrets operator vulnerable to privilege escalation. Remediation is available by upgrading affected packages to version 0.10.2.

CVE-2024-45041 at a Glance

CVE Identifier CVE-2024-45041
GHSA Identifier GHSA-qwgc-rr35-h4x9
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product Github.com/external secrets/external secrets
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.3

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:L/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 Low (I:L)
Availability High (A:H)

How to Fix CVE-2024-45041

To remediate this vulnerability, upgrade all affected Github.com/external secrets/external secrets 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/external-secrets/external-secrets fixed: 0.10.2
Upgrade github.com/external-secrets/external-secrets to 0.10.2
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/external-secrets/external-secrets

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-45041, inspect your project dependencies for Github.com/external secrets/external secrets:

inspect dependencies for github.com/external-secrets/external-secrets

Analyze the terminal output to locate any version of Github.com/external secrets/external secrets in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.2), 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-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. In Github.com/external secrets/external secrets, 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

### Details The external-secrets has a deployment called default-external-secrets-cert-controller, which is bound with a same-name ClusterRole. This ClusterRole has "get/list" verbs of secrets resources(https://github.com/external-secrets/external-secrets/blob/main/deploy/charts/external-secrets/templates/cert-controller-rbac.yaml#L49). It also has path/update verb of validatingwebhookconfigurations resources(https://github.com/external-secrets/external-secrets/blob/main/deploy/charts/external-secrets/templates/cert-controller-rbac.yaml#L27). As a result, if a malicious user can access the worker node which has this deployment. he/she can: 1. For the "get/list secrets" permission, he/she can abuse the SA token of this deployment to retrieve or get ALL secrets in the whole cluster, including the cluster-admin secret if created. After that, he/she can abuse the cluster-admin secret to do whatever he/she likes to the whole cluster, resulting in a cluster-level privilege escalation. 2. For the patch/update verb of validatingwebhookconfigurations, the malicious user can abuse these permissions to get sensitive data or lanuch DoS attacks: For the privilege escalation attack, by updating/patching a Webhook to make it listen to Secret update operations, the attacker can capture and log all data from requests attempting to update Secrets. More specifically, when a Secret is updated, this Webhook sends the request data to the logging-service, which can then log the content of the Secret. This way, an attacker could indirectly gain access to the full contents of the Secret. For the DoS attack, by updating/patching a Webhook, and making it deny all Pod create and update requests, the attacker can prevent any new Pods from being created or existing Pods from being updated, resulting in a Denial of Service (DoS) attack. ### PoC Please see the "Details" section ### Impact Privilege escalation

CVE-2024-45041 Affected Github.com/external secrets/external secrets Versions

1 component(s)
Fixed Versions:
0.10.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/external-secrets/external-secrets
Go
< 0.10.2
0.10.2

References

Frequently Asked Questions

What is CVE-2024-45041?
CVE-2024-45041 is a security vulnerability in Github.com/external secrets/external secrets involving External Secrets Operator vulnerable to privilege escalation under CWE-732: Incorrect Permission Assignment for Critical Resource.
Which Github.com/external secrets/external secrets versions are affected?
Affected versions include releases prior to 0.10.2 across affected packages: github.com/external-secrets/external-secrets.
What version fixes CVE-2024-45041?
Upgrading to 0.10.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/external-secrets/external-secrets affected?
Yes, github.com/external-secrets/external-secrets is affected in releases prior to 0.10.2. Upgrade your dependency to 0.10.2 or later.
What is the CVSS score of CVE-2024-45041?
CVE-2024-45041 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H.
What CWE is associated with CVE-2024-45041?
CVE-2024-45041 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check Go dependencies for CVE-2024-45041?
Run the dependency tree command: 'inspect dependencies for github.com/external-secrets/external-secrets'. 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-qwgc-rr35-h4x9",
  "modified" : "2024-09-18T18:44:47Z",
  "published" : "2024-09-09T18:16:22Z",
  "aliases" : [ "CVE-2024-45041" ],
  "summary" : "External Secrets Operator vulnerable to privilege escalation",
  "details" : "### Details\nThe external-secrets has a deployment called default-external-secrets-cert-controller, which is bound with a same-name ClusterRole. This ClusterRole has \"get/list\" verbs of secrets resources(https://github.com/external-secrets/external-secrets/blob/main/deploy/charts/external-secrets/templates/cert-controller-rbac.yaml#L49). It also has path/update verb of validatingwebhookconfigurations resources(https://github.com/external-secrets/external-secrets/blob/main/deploy/charts/external-secrets/templates/cert-controller-rbac.yaml#L27). As a result, if a malicious user can access the worker node which has this deployment. he/she can:\n1. For the \"get/list secrets\" permission, he/she can abuse the SA token of this deployment to retrieve or get ALL secrets in the whole cluster, including the cluster-admin secret if created. After that, he/she can abuse the cluster-admin secret to do whatever he/she likes to the whole cluster, resulting in a cluster-level privilege escalation.\n\n2. For the patch/update verb of validatingwebhookconfigurations, the malicious user can abuse these permissions to get sensitive data or lanuch DoS attacks:\n\nFor the privilege escalation attack, by updating/patching a Webhook to make it listen to Secret update operations, the attacker can capture and log all data from requests attempting to update Secrets. More specifically, when a Secret is updated, this Webhook sends the request data to the logging-service, which can then log the content of the Secret. This way, an attacker could indirectly gain access to the full contents of the Secret.\n\nFor the DoS attack, by updating/patching a Webhook, and making it deny all Pod create and update requests, the attacker can prevent any new Pods from being created or existing Pods from being updated, resulting in a Denial of Service (DoS) attack.\n\n### PoC\nPlease see the \"Details\" section\n\n### Impact\nPrivilege escalation",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/external-secrets/external-secrets"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/security/advisories/GHSA-qwgc-rr35-h4x9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45041"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/commit/0368b9806f660fa6bc52cbbf3c6ccdb27c58bb35"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/commit/428a452fd2ad45935312f2c2c0d40bc37ce6e67c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/external-secrets/external-secrets"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/blob/main/deploy/charts/external-secrets/templates/cert-controller-rbac.yaml#L27"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/external-secrets/external-secrets/blob/main/deploy/charts/external-secrets/templates/cert-controller-rbac.yaml#L49"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3126"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-732" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-09T18:16:22Z",
    "nvd_published_at" : "2024-09-09T15:15:11Z"
  }
}