Skip to main content
Vulnerability Database/CVE-2025-24884

CVE-2025-24884: kube-audit-rest Secret Disclosure Flaw

CVE-2025-24884 is an information disclosure vulnerability in kube-audit-rest that exposes Kubernetes secrets in audit logs when using the full-elastic-stack example configuration. This article covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-24884 Overview

CVE-2025-24884 affects kube-audit-rest, a logger that captures mutation and creation requests sent to the Kubernetes API. The flaw sits in the shipped full-elastic-stack example Vector configuration. When operators adopt this example in a production cluster, audit messages record the previous values of Kubernetes Secrets. Any user or process with access to the audit log pipeline can read those cleartext Secrets. The maintainer resolved the issue in version 1.0.16. The vulnerability maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.

Critical Impact

Previous Kubernetes Secret values were written into audit log output, exposing credentials, tokens, and other sensitive material to anyone with log access.

Affected Products

  • kube-audit-rest versions prior to 1.0.16
  • Deployments using the full-elastic-stack example Vector configuration
  • Kubernetes clusters forwarding audit output to Elastic via the example pipeline

Discovery Timeline

  • 2025-01-29 - CVE-2025-24884 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-24884

Vulnerability Analysis

kube-audit-rest acts as a validating or mutating admission webhook sink that logs incoming Kubernetes API requests. The project ships several example configurations to help operators forward captured audit data to downstream platforms. The full-elastic-stack example uses Vector to transform and ship events to Elasticsearch. In that configuration, the transformation pipeline did not redact the oldObject or prior state portion of admission requests involving Secrets. As a result, when a Secret was updated, deleted, or recreated, the previous Secret contents appeared verbatim in the audit stream and were persisted in Elasticsearch. Downstream analysts, log readers, and backup systems therefore received cleartext Kubernetes credentials.

Root Cause

The root cause is a missing redaction step in the example Vector pipeline. Kubernetes admission requests for Secret resources contain the full object body, including base64-encoded data fields. The example did not filter these fields before indexing, so sensitive values flowed into log storage. This is a configuration-level information disclosure defect ([CWE-200]).

Attack Vector

Exploitation requires local or logical access to the audit log destination rather than remote network access to the cluster. An actor with read access to the Elasticsearch index, Vector pipeline buffer, or any intermediate log sink can retrieve historical Secret values. Scenarios include SOC analysts with broad log read privileges, compromised log aggregator credentials, or shared observability tenants.

No exploit code is required. The vulnerability describes how data is written in the first place.

Detection Methods for CVE-2025-24884

Indicators of Compromise

  • Audit log documents in Elasticsearch containing kind: Secret with populated data or stringData fields
  • Vector pipeline events referencing requestObject or oldObject for Secret resources without redaction
  • Unexpected read queries against audit indices from accounts outside the platform or SOC teams
  • Backups or snapshots of audit indices retained outside the cluster trust boundary

Detection Strategies

  • Query the audit log index for Secret-kind entries and inspect whether data fields are present rather than redacted
  • Compare deployed kube-audit-rest versions against 1.0.16 across all clusters and namespaces
  • Review Vector configurations in GitOps repositories for the full-elastic-stack example without added filter transforms
  • Audit role bindings granting access to the Elasticsearch cluster or Vector sinks that store kube-audit-rest output

Monitoring Recommendations

  • Alert on any ingestion of documents containing kind: Secret with non-empty data into audit indices
  • Monitor Kubernetes admission webhook configurations for kube-audit-rest endpoints and track version drift
  • Track reads against the audit log index and flag queries from identities outside approved analyst groups
  • Review retention policies so that any Secret material already captured is purged on an accelerated schedule

How to Mitigate CVE-2025-24884

Immediate Actions Required

  • Upgrade kube-audit-rest to version 1.0.16 or later across every cluster
  • Rotate all Kubernetes Secrets that may have passed through the vulnerable audit pipeline, including service account tokens, registry credentials, and application secrets
  • Purge historical audit documents containing Secret contents from Elasticsearch and any downstream backups
  • Restrict read access to audit indices to a minimal set of operators until rotation and cleanup complete

Patch Information

The fix is available in kube-audit-rest1.0.16. See the GitHub commit db1aa5b and the GitHub Security Advisory GHSA-hcr5-wv4p-h2g2 for the authoritative patch details.

Workarounds

  • Replace the shipped full-elastic-stack example with a Vector pipeline that drops or hashes data, stringData, requestObject, and oldObject for Secret resources
  • Exclude Secret admission events from the audit pipeline entirely until the upgrade is deployed
  • Scope Elasticsearch roles so that only vetted platform engineers can read audit indices while remediation is in progress
  • Store audit output in an encrypted, access-controlled index separate from general observability data
bash
# Configuration example
See the GitHub Security Advisory GHSA-hcr5-wv4p-h2g2 for the corrected Vector pipeline.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.