CVE-2025-24884
JSON

5.1medium

kube-audit-rest's example logging configuration could disclose secret values in the audit log

Severity
5.1medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.20% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-hcr5-wv4p-h2g2GO-2025-3431

Description

kube-audit-rest is a simple logger of mutation/creation requests to the k8s api. If the "full-elastic-stack" example vector configuration was used for a real cluster, the previous values of kubernetes secrets would have been disclosed in the audit messages. This vulnerability is fixed in 1.0.16.

Affected

Product or packageVersionsReported by
RichardoC kube-audit-rest< 1.0.16CVE List
github.com/RichardoC/kube-audit-rest (Go)before 0.0.0-20250205113217-9df8886b4819, before 0.0.0-20250129191722-db1aa5b86725GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.1medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Classification

CWE-200CWE-212CWE-532

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

kube-audit-rest is a simple logger of mutation/creation requests to the k8s api. If the "full-elastic-stack" example vector configuration was used for a real cluster, the previous values of kubernetes secrets would have been disclosed in the audit messages. This vulnerability is fixed in 1.0.16.

GitHub Advisory Database
Impact

What kind of vulnerability is it? Who is impacted? If the "full-elastic-stack" example vector configuration was used for a real cluster, the previous values of kubernetes secrets would have been disclosed in the audit messages.

Patches

Has the problem been patched? What versions should users upgrade to? The example has been updated to fix this in commit 9df8886b4819409f566233adc7c3b7a43a4096ba

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading? Replace


          if .request.requestKind.kind == "Secret" {
            del(.request.object.data)
            .request.object.data.redacted = "REDACTED"
            del(.request.oldObject.data)
            .request.oldObject.data.redacted = "REDACTED"
          }

In the vector "audit-files-json-parser-and-redaction" step with


          if .request.requestKind.kind == "Secret" {
            # Redact the secret data
            del(.request.object.data)
            .request.object.data.redacted = "REDACTED"
            del(.request.oldObject.data)
            .request.oldObject.data.redacted = "REDACTED"
            # Remove the previously set secret data - Not bothering to parse it as this annotation shouldn't ever be needed
            del(.request.object.metadata.annotations.["kubectl.kubernetes.io/last-applied-configuration"])
            del(.request.oldObject.metadata.annotations.["kubectl.kubernetes.io/last-applied-configuration"])
          }
References

Are there any links users can visit to find out more?

Go Vulnerability Database

kube-audit-rest's example logging configuration could disclose secret values in the audit log in github.com/RichardoC/kube-audit-rest

NVD (es)

kube-audit-rest es un registrador simple de solicitudes de mutación/creación a la API de k8s. Si se hubiera utilizado la configuración de vector de ejemplo "full-elastic-stack" para un clúster real, los valores anteriores de los secretos de Kubernetes se habrían revelado en los mensajes de auditoría. Esta vulnerabilidad se solucionó en la versión 1.0.16.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-24884 changed 2025-01-31CVE Terms of Use
GitHub Advisory DatabaseGHSA-hcr5-wv4p-h2g2 changed 2025-02-05CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3431 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-24884 changed 2026-06-17Public domain