Miggo Logo

CVE-2024-58269: Rancher exposes sensitive information through audit logs

4.3

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
10/24/2025
Updated
10/24/2025
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/rancher/ranchergo< 0.0.0-20251013203444-50dc516a19ea0.0.0-20251013203444-50dc516a19ea

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is caused by insufficient redaction of sensitive data in Rancher's audit logs. The analysis of the provided patches reveals three key areas where the logging mechanism failed:

  1. Incomplete Annotation Redaction: The audit policy for redacting the kubectl.kubernetes.io/last-applied-configuration annotation was not recursive. The DefaultPolicies function in pkg/auth/audit/default.go was updated to use a recursive JSON path ($..), fixing the issue where sensitive values within this annotation were logged if they were nested inside other objects.

  2. Incorrect Secret Redaction: The redactSecret function in pkg/auth/audit/redact.go was mistakenly redacting data from the request body instead of the response body. This meant that any API response containing Kubernetes secret data was logged in cleartext.

  3. Insufficient Import URL Redaction: The redactImportUrl function in pkg/auth/audit/redact.go only checked the request URI for sensitive import URLs. It failed to check other parts of the request, such as the Referer header. An attacker with access to the logs could extract non-expiring cluster registration tokens from these headers.

The identified functions are directly responsible for these failures. During runtime, these functions would be invoked as part of the audit logging pipeline. An attacker triggering the vulnerability would cause these functions to process requests or responses containing sensitive data, which, prior to the patch, would be written to the audit logs without proper redaction. Therefore, these functions are the primary indicators of the vulnerability being triggered.

Vulnerable functions

github.com/rancher/rancher/pkg/auth/audit.DefaultPolicies
pkg/auth/audit/default.go
The `DefaultPolicies` function defines the audit redaction policies. The patch changes the JSON path for the `kubectl.kubernetes.io/last-applied-configuration` annotation from `$` (root) to `$..` (recursive). This implies the original policy was not comprehensive, failing to redact sensitive data when the annotation appeared in nested JSON objects within the audit log, leading to information disclosure.
github.com/rancher/rancher/pkg/auth/audit.redactSecret
pkg/auth/audit/redact.go
The `redactSecret` function was incorrectly attempting to redact sensitive secret data from the request body (`log.RequestBody`) instead of the response body (`log.ResponseBody`). As a result, when secrets were fetched or listed, the response body containing sensitive data was logged without redaction.
github.com/rancher/rancher/pkg/auth/audit.redactImportUrl
pkg/auth/audit/redact.go
The original `redactImportUrl` function only performed a simple prefix check on the request URI to redact cluster import URLs. The patch replaces this with more robust logic that also redacts the URL from the `Referer` header. The initial implementation was insufficient, allowing sensitive cluster registration tokens and import URLs to be logged if they appeared in request headers, leading to potential unauthorized cluster access.

WAF Protection Rules

WAF Rule

### Imp**t **Not*: T** *xploit*tion o* t*is issu* r*quir*s t**t t** m*li*ious us*r **v* ****ss to R*n***r’s *u*it lo* stor***.** * vuln*r**ility **s ***n i**nti*i** in R*n***r M*n***r, w**r* s*nsitiv* in*orm*tion, in*lu*in* s**r*t **t*, *lust*r impo

Reasoning

T** vuln*r**ility is **us** *y insu**i*i*nt r****tion o* s*nsitiv* **t* in R*n***r's *u*it lo*s. T** *n*lysis o* t** provi*** p*t***s r*v**ls t*r** k*y *r**s w**r* t** lo**in* m****nism **il**: *. **In*ompl*t* *nnot*tion R****tion**: T** *u*it poli