/

CVE-2026-54725

Severity:

CRITICAL RISK

(9.6)

SSRF via Vault Annotations (CWE-918) in K8s Webhook

CVE-2026-54725

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Credential Exfiltration and Cluster Compromise

Severity:

CRITICAL RISK

(9.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A server-side request forgery (SSRF) flaw in vault-secrets-webhook allows attacker-controlled Vault endpoints to receive Kubernetes ServiceAccount JWTs via crafted Pod annotations.

When a cluster uses the mutating webhook to inject secrets into Pods, a malicious or compromised workload can redirect vault client requests and exfiltrate credentials, enabling broader cluster abuse.

Affected context

This vulnerability affects Kubernetes clusters that deploy the vault-secrets-webhook to inject secrets into Pods using Vault-related annotations.

It is most relevant where:

  • Pod creators can freely set or modify annotations such as vault.security.banzaicloud.io/vault-addr and vault.security.banzaicloud.io/vault-serviceaccount
  • The webhook trusts these annotations as configuration for outbound Vault connections
  • ServiceAccount tokens are available in Pod contexts and used for Vault authentication

Under these conditions, annotation-controlled endpoints may cause sensitive tokens to be sent outside of intended trust boundaries.

Exploit preconditions

  • Attack surface: Kubernetes API / Pod creation path using the mutating webhook
  • Required access: Ability to create or modify Pods (or related resources) with custom Vault annotations in the affected namespace or cluster
  • Trigger point: Admission-time mutation when vault-secrets-webhook processes vault-addr and vault-serviceaccount annotations and establishes a Vault client
  • Why exploitation is possible: The webhook accepts attacker-supplied Vault addresses and uses ServiceAccount JWTs for authentication without adequately constraining or validating the target endpoint, enabling SSRF and credential exfiltration

Why this happens

The core issue is a trust boundary violation where configuration data from untrusted Pod annotations is used directly to construct outbound network requests.

parseVaultConfig() treats vault.security.banzaicloud.io/vault-addr and related annotations as authoritative configuration, and MutateConfigMap/MutateSecret then invoke newVaultClient to connect to that address.

This behavior aligns with CWE-918: Server-Side Request Forgery (SSRF), where a server-side component makes arbitrary outbound requests based on user-controlled input, leaking authentication material and expanding the effective attack surface.

Potential impact

  • Exfiltration of Kubernetes ServiceAccount JWTs to attacker-controlled Vault instances
  • Unauthorized access to Vault-managed secrets using stolen credentials
  • Lateral movement within the cluster by impersonating workloads or accessing additional services
  • Escalation of privileges if high-privilege ServiceAccounts are targeted
  • Broader compromise of application data and configuration relying on Vault-based secrets

General mitigation guidance

Effective mitigation focuses on constraining where and how external endpoints are derived and reducing the trust placed in workload-controlled metadata.

Pattern-based defenses include:

  • Enforcing a fixed, centrally managed Vault address in webhook configuration rather than accepting it from Pod annotations
  • Restricting which annotations are honored, and treating all workload-supplied endpoints as untrusted
  • Validating outbound targets against an allowlist of internal, expected Vault hosts before establishing connections
  • Minimizing ServiceAccount token privileges used for Vault authentication and segmenting roles by namespace or workload
  • Applying admission controls or policies (e.g., OPA/Gatekeeper, Kyverno) to block risky annotations from untrusted tenants

These patterns aim to keep sensitive tokens and secret flows within known trust boundaries and reduce the blast radius of any misconfiguration.

How teams detect issues like this

Detection typically relies on both configuration review and runtime monitoring:

  • Static analysis or policy checks on webhook code to flag use of user-controlled annotations for network endpoints
  • Kubernetes admission policies that detect and deny Pods with suspicious or non-standard Vault annotations
  • Centralized logging of webhook activity, especially outbound Vault connections and target addresses, to spot anomalous destinations
  • Network monitoring and egress controls that alert on or block traffic from the webhook to unexpected Vault hosts or external networks
  • Periodic review of ServiceAccount usage patterns and Vault authentication logs to identify unusual token consumers or access attempts

Sources

SourceLink
github.comgithub.com/bank-vaults/vault-secrets-webhook/commit/76db45976fee0f54cafd94dffa425e6b542f65a0
github.comgithub.com/bank-vaults/vault-secrets-webhook/releases/tag/v1.23.1
github.comgithub.com/bank-vaults/vault-secrets-webhook/security/advisories/GHSA-r2v3-8gwf-7ghm

Frequently asked

questions

Exploitation depends on RBAC and admission controls. Any principal that can create or modify Pods (or related resources) with the relevant Vault annotations in namespaces observed by the webhook may be able to trigger the issue, especially in multi-tenant clusters.

An attacker must be able to define or change Pod annotations processed by vault-secrets-webhook. This typically corresponds to create/update permissions on Pods or higher-level controllers (Deployments, StatefulSets) in the affected namespaces.

The safest pattern is to completely decouple endpoint selection and credential handling from workload-controlled inputs. Use fixed, centrally configured Vault endpoints, validate any dynamic values against strict allowlists, and ensure that tokens are only sent to vetted internal services.

Treat all user or workload-supplied configuration as untrusted, especially when it influences network targets or authentication flows. Enforce strong validation on outbound endpoints, implement egress controls, use least-privilege ServiceAccounts, and codify these expectations in admission policies and security reviews to catch violations before deployment.

Find out what's already
exploitable in your codebase.