# CVE-2024-45041: External Secrets Operator vulnerable to privilege escalation

> Attackers can escalate privileges to read all cluster secrets or disrupt operations via excessive permissions in the cert-controller ClusterRole.

- **Severity:** High 8.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Sep 2024
- **Updated:** 9 Sep 2024
- **Also known as:** GHSA-qwgc-rr35-h4x9, GO-2024-3126

## What is CVE-2024-45041?

CVE-2024-45041 is a high-severity vulnerability in external-secrets, published on 9 Sep 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

External Secrets Operator is a Kubernetes operator that integrates external secret management systems. 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. It also has path/update verb of validatingwebhookconfigurations resources.  This can be used to abuse the SA token of the deployment to retrieve or get ALL secrets in the whole cluster, capture and log all data from requests attempting to update Secrets, or make a webhook deny all Pod create and update requests. This vulnerability is fixed in 0.10.2.

Weakness: CWE-732 (Incorrect Permission Assignment for Critical Resource), CWE-269 (Improper Privilege Management)

## Which versions are affected by CVE-2024-45041?

3 open source packages ship an affected version, including github.com/external-secrets/external-secrets. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/external-secrets/external-secrets` | Go | All versions | 0.10.2 |
| `github.com/external-secrets/external-secrets` | Go | All versions | 0.10.2 |
| `github.com/external-secrets/external-secrets` | Go | All versions | 0.10.2 |

Products: External-Secrets External Secrets Operator.

## How do I fix CVE-2024-45041?

Upgrade github.com/external-secrets/external-secrets to 0.10.2 or later.

## Is CVE-2024-45041 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45041 exists.

## Other vulnerabilities in external-secrets

- [CVE-2024-36540](https://insights.sbomify.com/CVE-2024-36540/): Missing authorization in n/a (critical 9.8)
- [CVE-2026-22822](https://insights.sbomify.com/CVE-2026-22822/): External Secrets Operator insecurely retrieves secrets through the getSecretKey templating function (critical 9.3)
- [CVE-2026-34984](https://insights.sbomify.com/CVE-2026-34984/): External Secrets Operator has DNS exfiltration via getHostByName in its v2 template engine (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-45041 and fix it if it is affected.

What it is: CVE-2024-45041 is a high-severity vulnerability in external-secrets, published on 9 Sep 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45041 exists.

Affected packages and fixed versions:
- github.com/external-secrets/external-secrets (Go): affected all versions; fixed in 0.10.2
- github.com/external-secrets/external-secrets (Go): affected all versions; fixed in 0.10.2
- github.com/external-secrets/external-secrets (Go): affected all versions; fixed in 0.10.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-45041/ (Markdown: https://insights.sbomify.com/CVE-2024-45041/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-45041
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-45041
- OSV: https://osv.dev/vulnerability/CVE-2024-45041

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-45041/
Summaries are generated and may contain mistakes; the official description above is the record.
