# CVE-2023-22649: Rancher 'Audit Log' leaks sensitive information

> Attackers can access sensitive data leaked into audit logs when the opt-in audit logging feature is enabled with specific levels.

- **Severity:** High 8.4 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:H/VI:N/VA:N/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 16 Oct 2024
- **Updated:** 16 Oct 2024
- **Also known as:** GHSA-xfj7-qf8w-2gcr, GO-2024-2537

## What is CVE-2023-22649?

CVE-2023-22649 is a high-severity vulnerability in SUSE rancher, published on 16 Oct 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

A vulnerability has been identified which may lead to sensitive data being leaked into Rancher's audit logs. [Rancher Audit Logging](https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-api-audit-log) is an opt-in feature, only deployments that have it enabled and have [AUDIT_LEVEL](https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-api-audit-log#audit-log-levels) set to `1 or above` are impacted by this issue.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File)

## Which versions are affected by CVE-2023-22649?

7 open source packages ship an affected version, including github.com/rancher/rancher. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/rancher/rancher` | Go | All versions | None |
| `github.com/rancher/rancher` | Go | From 2.6.0 | 2.6.14 |
| `github.com/rancher/rancher` | Go | From 2.6.0 | 2.6.14 |
| `github.com/rancher/rancher` | Go | From 2.7.0 | 2.7.10 |
| `github.com/rancher/rancher` | Go | From 2.7.0 | 2.7.10 |
| `github.com/rancher/rancher` | Go | From 2.8.0 | 2.8.2 |
| `github.com/rancher/rancher` | Go | From 2.8.0 | 2.8.2 |

Products: Suse Rancher.

## How do I fix CVE-2023-22649?

Upgrade github.com/rancher/rancher to a fixed version for your release line: 2.6.14, 2.7.10 or 2.8.2.

## Is CVE-2023-22649 being exploited?

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

Public exploit code:

- Rancher Audit Log Sensitive Information Leak (metasploit)

## Other vulnerabilities in SUSE rancher

- [CVE-2023-22647](https://insights.sbomify.com/CVE-2023-22647/): Rancher vulnerable to Privilege Escalation via manipulation of Secrets (critical 9.9)
- [CVE-2023-22651](https://insights.sbomify.com/CVE-2023-22651/): Rancher Webhook is misconfigured during upgrade process (critical 9.9)
- [CVE-2022-43757](https://insights.sbomify.com/CVE-2022-43757/): Rancher: Exposure of sensitive fields (critical 9.9)
- [CVE-2021-36782](https://insights.sbomify.com/CVE-2021-36782/): Rancher: Plaintext storage and exposure of credentials in Rancher API and cluster.management.cattle.io object (critical 9.9)
- [CVE-2021-36783](https://insights.sbomify.com/CVE-2021-36783/): Rancher: Failure to properly sanitize credentials in cluster template answers (critical 9.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-22649 and fix it if it is affected.

What it is: CVE-2023-22649 is a high-severity vulnerability in SUSE rancher, published on 16 Oct 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-22649 exists.

Affected packages and fixed versions:
- github.com/rancher/rancher (Go): affected all versions; no fix listed
- github.com/rancher/rancher (Go): affected from 2.6.0; fixed in 2.6.14
- github.com/rancher/rancher (Go): affected from 2.6.0; fixed in 2.6.14
- github.com/rancher/rancher (Go): affected from 2.7.0; fixed in 2.7.10
- github.com/rancher/rancher (Go): affected from 2.7.0; fixed in 2.7.10
- github.com/rancher/rancher (Go): affected from 2.8.0; fixed in 2.8.2
- github.com/rancher/rancher (Go): affected from 2.8.0; fixed in 2.8.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-2023-22649/ (Markdown: https://insights.sbomify.com/CVE-2023-22649/index.md)
```

## Sources

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

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