/

CVE-2026-41323

Severity:

HIGH RISK

(8.1)

Server-Side Request Forgery and Sensitive Token Exposure

CVE-2026-41323

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery and Sensitive Token Exposure

CWE:

CWE-200, CWE-918

Impact:

Cluster Compromise via Token Theft and Misused Outbound Requests

Severity:

HIGH RISK

(8.1)

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

Kyverno's apiCall feature in ClusterPolicy automatically attached the admission controller's ServiceAccount token to outbound HTTP requests without validating the destination URL.

If a policy is configured to call an attacker-controlled endpoint, that endpoint can receive and reuse the token, potentially gaining permissions to patch webhook configurations and compromise the entire cluster.

Affected context

This vulnerability appears in Kyverno deployments that use ClusterPolicies with the apiCall feature enabled.

The issue manifests when:

  • The policy's apiCall is configured with arbitrary URLs, including non-cluster endpoints.
  • Outbound HTTP requests automatically carry the admission controller ServiceAccount token.
  • Network controls allow egress from the admission controller pod to external or attacker-controlled services.

In such contexts, any misconfigured or malicious policy that references an untrusted URL exposes the attached token to that remote endpoint.

Exploit preconditions

  • Attack surface: Kyverno admission controller's apiCall-based HTTP requests triggered during Kubernetes admission.
  • Required access: Ability to create, modify, or influence ClusterPolicies (or associated configurations) that define apiCall URLs; or ability to cause Kyverno to load malicious policy bundles.
  • Trigger point: Evaluation of a policy using apiCall that points to a URL under attacker control, causing Kyverno to send a request with its ServiceAccount token.
  • Why exploitation is possible: The apiCall mechanism:
  • Automatically attaches the admission controller ServiceAccount token to outbound requests.
  • Does not validate or restrict the destination URL to trusted cluster-local services.
  • Relies on this token for authentication, thereby exposing it directly to any endpoint the apiCall references.

Why this happens

The underlying issue combines two insecure patterns:

  • Unvalidated outbound requests (CWE-918: Server-Side Request Forgery): Kyverno's apiCall feature allows arbitrary URLs to be configured, treating them as trusted destinations without enforcing scoping to known, internal services.
  • Sensitive information exposure in transit (CWE-200: Exposure of Sensitive Information): The admission controller ServiceAccount token, a high-privilege credential, is automatically attached to all apiCall requests, regardless of the target's trust level.

Conceptually, this represents a flawed trust boundary where infrastructure control-plane credentials are reused for user-defined or policy-defined HTTP calls. By conflating policy-driven external integration with core control-plane authentication, the design allows untrusted destinations to receive privileged tokens, breaking the assumption that such tokens only traverse secure, internal paths.

Potential impact

  • An attacker-controlled endpoint may capture the admission controller ServiceAccount token.
  • Attackers could use the stolen token to call the Kubernetes API with the admission controller's permissions.
  • The token may allow patching or reconfiguring mutating/validating webhooks, including Kyverno's own webhook configuration.
  • Attackers might disable or alter cluster-wide security policies and admission controls.
  • The cluster control plane could be effectively fully compromised, enabling workload modification, privilege escalation, or policy bypass.

General mitigation guidance

Effective mitigation focuses on both limiting where outbound requests can go and preventing automatic credential propagation:

  • Constrain outbound destinations: Design policies so that apiCall endpoints are limited to well-defined, internal services. Consider patterns where URLs are selected from a fixed, policy-governed allowlist rather than arbitrary user input.
  • Decouple credentials from untrusted calls: Avoid attaching high-privilege ServiceAccount tokens to requests that are influenced by policy data or user configuration. Instead, use scoped credentials specifically provisioned for external calls, following least privilege.
  • Harden trust boundaries: Treat any configuration that controls network destinations as untrusted input. Apply validation, including hostname and scheme checks, and restrict connectivity via network policies or service meshes to prevent egress to unknown endpoints.
  • Reduce token power: Ensure tokens used by admission components have only the permissions strictly required for their function. Prefer fine-grained roles and separate identities for configuration management and admission logic.
  • Adopt secure defaults: Configure policy engines and admission controllers so that external integrations are disabled or heavily restricted by default, requiring explicit, security-reviewed configuration for outbound HTTP features.

How teams detect issues like this

Detection efforts can center on both configuration analysis and runtime observation:

  • Policy and configuration review: Examine ClusterPolicies for apiCall blocks that reference non-cluster-local, IP-based, or otherwise unvetted URLs. Code review checklists can flag policies that call arbitrary domains or services outside a defined trust boundary.
  • Static analysis and policy linting: Use static analysis or custom linters to detect:
  • apiCall usage with dynamically constructed URLs.
  • Policies that lack clear scoping or validation rules for endpoints.
  • Patterns where tokens or headers are implicitly propagated to external URLs.
  • Admission controller and RBAC audits: Inspect ServiceAccount roles for over-privileged permissions, especially the ability to patch ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Automated RBAC analysis tools can highlight roles that can reconfigure webhooks.
  • Network and log monitoring: Monitor outbound HTTP traffic from the admission controller pods. Network policies, service mesh telemetry, and HTTP logs can surface unexpected calls to external or untrusted domains. Alerting on anomalous destinations or unusual API invocation patterns helps detect misuse.
  • Security policy enforcement: Implement organization-wide policies (e.g., via policy-as-code tools) that prohibit or require justification for apiCall endpoints outside a predefined set of internal services.

Sources

SourceLink
github.comgithub.com/kyverno/kyverno/commit/bc4f91c4801b1eaa2edc0a14e2f1b0af8cf0c1f5
github.comgithub.com/kyverno/kyverno/commit/c2eab00033e635bda4e4efb58c1b472b41728bb6
github.comgithub.com/kyverno/kyverno/commit/f70e8ac1e7acd2e3844f9553e4a884f07f953de0
github.comgithub.com/kyverno/kyverno/security/advisories/GHSA-f9g8-6ppc-pqq4

Frequently asked

questions

Exploitability depends on who can influence Kyverno policies and outbound connectivity. If an attacker can create or modify ClusterPolicies that use apiCall, or introduce policies referencing attacker-controlled URLs, and the admission controller can reach those URLs, the vulnerability becomes directly exploitable.

An attacker typically needs the ability to define or alter Kyverno policies, or to inject configurations that Kyverno loads, combined with network reachability from the admission controller to their server. Once a token is exfiltrated, the attacker's effective access may escalate to whatever permissions the admission controller's ServiceAccount holds.

The safest pattern is to prevent high-privilege tokens from being automatically attached to user-influenced or policy-driven HTTP requests, and to restrict apiCall destinations to explicitly trusted, internal endpoints. Separating identities for external integrations and limiting their permissions ensures that even if a token is exposed, its blast radius remains small.

Future designs should establish clear trust boundaries for outbound connections, treat configuration-controlled URLs as untrusted input, and avoid using control-plane credentials for external communication. Adopting least-privilege identities, egress restrictions, security-focused code review for features that perform network calls, and automated checks for SSRF-like patterns helps prevent recurrence.

Find out what's already
exploitable in your codebase.