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

CVE-2025-48374: zot Registry Information Disclosure Vulnerability

CVE-2025-48374 is an information disclosure vulnerability in zot container registry that exposes Keycloak client secrets in container logs. This article covers the technical details, affected versions, and remediation steps.

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-48374 Overview

CVE-2025-48374 affects zot, an Open Container Initiative (OCI) compliant container image and artifact registry. The vulnerability causes the OpenID Connect (OIDC) client secret to be written to container stdout logs when zot is configured with Keycloak as an identity provider. The sensitive credential appears in logs at container startup, exposing it to anyone with access to log aggregation systems, container runtime output, or orchestration platform logs.

The flaw is classified under CWE-532: Insertion of Sensitive Information into Log File. Versions prior to 2.1.3 (pseudoversion 1.4.4-0.20250522160828-8a99a3ed231f) are affected.

Critical Impact

Keycloak OIDC client secrets are disclosed in plaintext container logs, enabling attackers with log access to impersonate the registry client against the identity provider.

Affected Products

  • zot container registry versions prior to 2.1.3
  • zot deployments using Keycloak as an OIDC authentication provider
  • Pseudoversions prior to 1.4.4-0.20250522160828-8a99a3ed231f

Discovery Timeline

  • 2025-05-22 - CVE-2025-48374 published to NVD
  • 2025-05-22 - Patch committed to the project-zot repository (8a99a3ed231f)
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-48374

Vulnerability Analysis

zot provides configurable authentication through the HTTP.Auth configuration block, which supports both LDAP bind credentials and OIDC provider configurations. Before writing the active configuration to logs at startup, zot calls a sanitization routine that redacts secrets. The original sanitization logic only masked the LDAP bindPassword field. It did not iterate over configured OIDC providers to redact per-provider ClientSecret values.

As a result, when operators configured Keycloak (or any OIDC provider) with a ClientSecret, zot printed the full configuration — including the secret — to container stdout during initialization. Any observer with access to container logs, Kubernetes kubectl logs output, Docker daemon logs, or centralized logging platforms could extract the credential.

Root Cause

The root cause is incomplete input sanitization in pkg/api/config/config.go. The log-sanitization function handled LDAP credentials but omitted the parallel code path for OIDC provider secrets. Each entry in c.HTTP.Auth.OpenID.Providers retained its ClientSecret field value in the serialized log output.

Attack Vector

Exploitation requires local access to container logs or to downstream log sinks that ingest stdout from the zot process. An attacker who obtains the leaked ClientSecret can authenticate to Keycloak as the zot client, request tokens, and potentially pivot to resources that trust that OIDC client. The attack is passive from the perspective of the registry itself — no network interaction with zot is required.

go
// Patch excerpt from pkg/api/config/config.go
// Source: https://github.com/project-zot/zot/commit/8a99a3ed231fdcd8467e986182b4705342b6a15e

// Sanitize HTTP config
if c.HTTP.Auth != nil {
    // Sanitize LDAP bind password
    if c.HTTP.Auth.LDAP != nil && c.HTTP.Auth.LDAP.bindPassword != "" {
        sanitizedConfig.HTTP.Auth.LDAP = &LDAPConfig{}

        if err := DeepCopy(c.HTTP.Auth.LDAP, sanitizedConfig.HTTP.Auth.LDAP); err != nil {
            panic(err)
        }

        sanitizedConfig.HTTP.Auth.LDAP.bindPassword = "******"
    }

    // Sanitize OpenID client secrets
    if c.HTTP.Auth.OpenID != nil {
        sanitizedConfig.HTTP.Auth.OpenID = &OpenIDConfig{
            Providers: make(map[string]OpenIDProviderConfig),
        }

        for provider, config := range c.HTTP.Auth.OpenID.Providers {
            sanitizedConfig.HTTP.Auth.OpenID.Providers[provider] = OpenIDProviderConfig{
                Name: config.Name,
                // ClientSecret redacted in sanitized copy
            }
        }
    }
}

The fix adds an explicit loop over OIDC providers and constructs a sanitized copy that omits the ClientSecret field before logging.

Detection Methods for CVE-2025-48374

Indicators of Compromise

  • Occurrences of ClientSecret with a non-redacted value in container stdout logs or aggregated log stores
  • Keycloak authentication events using the zot client ID originating from IP addresses outside the registry infrastructure
  • Unexpected OIDC token issuance for the zot client in Keycloak admin event logs

Detection Strategies

  • Scan existing log retention stores (Elasticsearch, Loki, CloudWatch, Splunk) for the zot configuration dump pattern containing OpenID provider entries with populated ClientSecret fields.
  • Compare the running zot image digest and version against the fixed release 2.1.3 or pseudoversion 1.4.4-0.20250522160828-8a99a3ed231f.
  • Review Keycloak admin and client authentication logs for anomalous client_credentials or token-exchange activity associated with the zot OIDC client.

Monitoring Recommendations

  • Enable alerting on log lines matching OIDC secret patterns in container log pipelines and treat matches as credential-exposure incidents.
  • Monitor Keycloak client-authentication events for geographic or network anomalies tied to the zot client.
  • Audit access control lists for log aggregation platforms to ensure only authorized operators can view container stdout for the registry namespace.

How to Mitigate CVE-2025-48374

Immediate Actions Required

  • Upgrade zot to version 2.1.3 or later, or pin to pseudoversion 1.4.4-0.20250522160828-8a99a3ed231f or newer.
  • Rotate the Keycloak OIDC ClientSecret for every zot deployment that logged configuration output on any affected version.
  • Purge or restrict access to historical container logs that may contain the exposed secret in both local log files and centralized logging backends.
  • Audit Keycloak session and token issuance history for the zot client to confirm no unauthorized use occurred.

Patch Information

The fix is tracked in commit 8a99a3ed231f and documented in GitHub Security Advisory GHSA-c37v-3c8w-crq8. The patch extends the configuration sanitizer in pkg/api/config/config.go to iterate over all OIDC providers and remove the ClientSecret field before serialization.

Workarounds

  • Reduce the log verbosity of the zot container at startup to suppress the configuration dump if upgrading is not immediately possible.
  • Restrict read permissions on container logs through Kubernetes RBAC, Docker socket controls, and log-platform access policies.
  • Rotate the Keycloak ClientSecret on a short recurring interval until the registry is upgraded to a fixed version.
bash
# Verify the running zot version and plan the upgrade
docker inspect --format '{{.Config.Image}}' <zot-container>
docker pull ghcr.io/project-zot/zot:v2.1.3

# Rotate the Keycloak OIDC client secret after upgrading
kcadm.sh update clients/<client-uuid> -r <realm> \
    -s 'secret=<new-strong-secret>'

# Kubernetes: redeploy with the updated image and secret reference
kubectl set image deployment/zot zot=ghcr.io/project-zot/zot:v2.1.3
kubectl rollout restart deployment/zot

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.