Skip to main content
Vulnerability Database/CVE-2026-59341

CVE-2026-59341: Sealed Secrets Information Disclosure Flaw

CVE-2026-59341 is an information disclosure vulnerability in the Sealed Secrets controller that allows attackers to exploit template logic as a decryption oracle. This post explains its impact, technical details, and mitigation.

Published:

CVE-2026-59341 Overview

CVE-2026-59341 is a side-channel information disclosure vulnerability in the Bitnami Sealed Secrets controller. The unauthenticated POST /v1/verify and POST /v1/rotate endpoints render Go templates from spec.template.data using decrypted secret payloads as the evaluation context. Because the spec.template.data field is excluded from the AEAD authenticated-data label binding, an attacker with internal network access can copy valid metadata and encryptedData while injecting arbitrary template logic. Template execution errors map directly to HTTP response codes, turning the handler into a decryption oracle that leaks one bit of plaintext per request.

Critical Impact

An attacker with in-cluster network access to port :8080 can extract the full plaintext of any sealed secret through iterative oracle queries against the verify or rotate endpoints.

Affected Products

  • Bitnami Sealed Secrets controller (see GitHub Security Advisory GHSA-qj4p-m373-p2wg)
  • Kubernetes clusters running the Sealed Secrets controller with the internal service port reachable from workloads
  • Deployments accessible via kubectl port-forward to the controller service

Discovery Timeline

  • 2026-09-15 - CVE CVE-2026-59341 published to NVD
  • 2026-09-16 - Last updated in NVD database

Technical Details for CVE-2026-59341

Vulnerability Analysis

The vulnerability resides in the Sealed Secrets controller's HTTP handlers for /v1/verify and /v1/rotate. Both endpoints invoke Unseal() to decrypt the target SealedSecret, then render any Go templates found in spec.template.data.* using the decrypted payload as the evaluation context. This behavior is implemented in pkg/apis/sealedsecrets/v1alpha1/sealedsecret_expansion.go.

The controller returns HTTP 200 when template execution succeeds and HTTP 409 when it fails. This differential response constitutes a classic observable-discrepancy side channel [CWE-203]. An attacker who can submit crafted payloads observes one bit of plaintext information per request based on the response status.

Exploitation requires no authentication. The controller's internal service port :8080 is not exposed to the public internet by default, but it is reachable from any pod within the Kubernetes cluster or through a kubectl port-forward session.

Root Cause

The root cause is a missing Authenticated Encryption with Associated Data (AEAD) label binding. The spec.template.data field is omitted from the AEAD authenticated-data label that binds ciphertext to metadata. An attacker can therefore copy a target's valid metadata and encryptedData verbatim, satisfy AEAD decryption and label validation, and freely substitute spec.template.data with attacker-controlled template logic. The decrypted plaintext is then piped into an attacker-supplied template evaluator, violating the integrity boundary between ciphertext authentication and rendering context.

Attack Vector

An attacker with in-cluster network access captures any existing SealedSecret resource and forwards it to /v1/verify or /v1/rotate with a modified spec.template.data field. By injecting conditional template logic such as {{ if eq (substr 0 1 .password) "S" }}ok{{ else }}{{ fail "x" }}{{ end }}, the attacker probes individual characters of the decrypted secret. A response of HTTP 200 confirms the guess; HTTP 409 rejects it. Repeating the process character-by-character reconstructs the complete plaintext of any sealed secret. See the GitHub Security Advisory GHSA-qj4p-m373-p2wg for the full technical writeup.

Detection Methods for CVE-2026-59341

Indicators of Compromise

  • High volumes of POST requests to /v1/verify or /v1/rotate from a single in-cluster source over a short interval
  • Repeated HTTP 409 responses from the Sealed Secrets controller interleaved with occasional HTTP 200 responses
  • Requests containing Go template syntax such as {{ if ... }}, {{ fail ... }}, or substr calls in the spec.template.data field
  • Unexpected kubectl port-forward sessions targeting the Sealed Secrets controller service on port :8080

Detection Strategies

  • Enable controller access logging and alert on requests to /v1/verify and /v1/rotate where the request body includes template delimiters ({{, }})
  • Baseline the normal request rate to the controller and flag statistical anomalies indicative of iterative oracle probing
  • Correlate Kubernetes audit logs for anomalous pod-to-service traffic patterns targeting the controller namespace

Monitoring Recommendations

  • Ingest Sealed Secrets controller logs and Kubernetes audit events into a centralized analytics platform for correlation and retention
  • Monitor for kubectl port-forward API calls referencing the Sealed Secrets service and alert on unexpected principals
  • Track the ratio of HTTP 409 to HTTP 200 responses on the affected endpoints as a leading indicator of oracle abuse

How to Mitigate CVE-2026-59341

Immediate Actions Required

  • Upgrade the Sealed Secrets controller to the fixed release identified in GHSA-qj4p-m373-p2wg
  • Restrict network access to the controller's :8080 service using Kubernetes NetworkPolicies limiting ingress to authorized namespaces
  • Audit RBAC bindings that permit pods/portforward on the controller namespace and revoke unnecessary grants
  • Rotate any secrets managed by Sealed Secrets that may have been exposed prior to remediation

Patch Information

The maintainers have published a fix through the Bitnami Sealed Secrets repository. Refer to the security advisory for the specific patched version and release notes. The fix binds spec.template.data into the AEAD authenticated-data label so tampering invalidates decryption.

Workarounds

  • Apply a NetworkPolicy restricting ingress to the Sealed Secrets controller service to only the API server and administrative namespaces
  • Deny pods/portforward and services/portforward permissions in cluster RBAC for non-administrative service accounts
  • Deploy an ingress-level filter that rejects requests to /v1/verify and /v1/rotate containing Go template delimiters until the patch is applied
bash
# Example NetworkPolicy restricting access to the Sealed Secrets controller
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: restrict-sealed-secrets-controller
  namespace: kube-system
spec:
  podSelector:
    matchLabels:
      name: sealed-secrets-controller
  policyTypes:
    - Ingress
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: kube-system
      ports:
        - protocol: TCP
          port: 8080

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

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.