Skip to main content

Kubernetes CVE-2026-40868

HIGH
Unintended Proxy or Intermediary ('Confused Deputy') (CWE-441)
2026-04-14 https://github.com/kyverno/kyverno GHSA-q93q-v844-jrqp
8.1
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Compromise policy repository
  2. Delivery
    Inject malicious ClusterPolicy with attacker-controlled service.url
  3. Exploit
    GitOps sync deploys policy to cluster
  4. Install
    Kyverno evaluates policy and triggers servicecall
  5. C2
    executor.addHTTPHeaders injects ServiceAccount token
  6. Execute
    HTTP request transmits token to attacker endpoint
  7. Impact
    Attacker authenticates as kyverno ServiceAccount
  8. Step 8
    Exploit RBAC grants for cluster operations

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service Proxy/intermediary controls
Exploitation Conditions

Attacker must have permission to create or update ClusterPolicy resources or create GlobalContextEntry resources in the target Kubernetes cluster. In GitOps deployments, this translates to write access to the policy repository or ability to inject commits into the repository's sync workflow (supply chain compromise). The vulnerable ClusterPolicy or GlobalContextEntry must use the context.apiCall.service.url feature without explicitly setting an Authorization request header, triggering the implicit token injection logic in executor.addHTTPHeaders. Namespaced Policy resources cannot exploit this vulnerability due to servicecall blocking at the urlPath gate. Successful exfiltration requires network reachability from Kyverno controller pods to the attacker-controlled endpoint specified in service.url, which may be blocked by restrictive egress policies but is typically allowed in default cluster networking configurations. Impact severity depends on RBAC grants bound to the kyverno-controller ServiceAccount - deployments using cluster-admin or similarly privileged roles face full cluster compromise, while minimal-RBAC deployments limit post-exploitation capabilities.

Impact

Real-world risk is significant for GitOps environments where policy repositories are a supply chain attack vector. CVSS 8.1 accurately reflects the network-accessible attack (AV:N) with straightforward exploitation (AC:L) requiring only ClusterPolicy creation privileges (PR:L), resulting in high confidentiality and integrity impact through token exfiltration and potential privilege escalation. No user interaction required (UI:N) and unchanged scope (S:U) indicate the attack remains within the Kyverno controller's privilege boundary. EPSS data not provided, but the combination of GitHub advisory with functional PoC, clear exploitation path, and broad Kyverno deployment in production clusters suggests elevated real-world likelihood. No CISA KEV listing indicates exploitation is not yet widespread, but the GitOps threat model (compromised policy repo becomes untrusted input) represents a realistic attack chain in modern CI/CD workflows. The RBAC-dependent impact creates variable risk: in clusters where the Kyverno ServiceAccount has cluster-admin rights (common default), token exfiltration enables full cluster compromise. The existence of a detailed PoC with reproducible test harness lowers the skill barrier for exploitation. Priority should be high for any deployment using ClusterPolicy or GlobalContextEntry with servicecall features, especially in GitOps configurations where policy source integrity is not cryptographically verified.

Exploit ScenarioDerived

An attacker compromises a GitOps repository managing Kyverno policies and commits a malicious ClusterPolicy containing a context.apiCall.service definition targeting the attacker's internet-accessible HTTP server. When the GitOps controller (Flux/ArgoCD) synchronizes this policy to the cluster, Kyverno evaluates the policy and executes the servicecall without an explicit Authorization header. The executor.addHTTPHeaders function automatically injects Authorization: Bearer [kyverno-serviceaccount-token] and transmits it to the attacker's endpoint. The attacker captures the token and uses kubectl with --token= to authenticate as the Kyverno ServiceAccount, leveraging its cluster-wide RBAC grants to create privileged pods, access secrets, or modify critical cluster resources. Functional proof-of-concept code demonstrating token injection and exfiltration is included in the GitHub advisory attachments.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 16, 2026

Kyverno's apiCall service helper automatically injects the controller's ServiceAccount token into HTTP requests when ClusterPolicy or GlobalContextEntry authors omit an Authorization header, enabling token exfiltration to attacker-controlled endpoints via confused deputy vulnerability. Affects deployments where policy YAML repositories are compromised (GitOps threat model) or ClusterPolicy creation is possible. CVSS 8.1 (High) reflects network attack vector with low complexity and low privileges required. No CISA KEV listing or public exploit identified at time of analysis, but GitHub advisory includes working proof-of-concept demonstrating token injection and exfiltration.

RemediationAI

Consult the GitHub security advisory at https://github.com/kyverno/kyverno/security/advisories/GHSA-q93q-v844-jrqp for vendor-released patched versions and upgrade instructions. Immediate workaround: audit all existing ClusterPolicy and GlobalContextEntry manifests for context.apiCall.service usage and ensure every servicecall explicitly sets an Authorization header (including empty string if authentication is not required), which disables the implicit token injection per the executor.addHTTPHeaders conditional logic. Compensating control with trade-offs: restrict ClusterPolicy and GlobalContextEntry creation via Kubernetes RBAC to only highly trusted principals, reducing the attack surface at the cost of limiting self-service policy workflows. For GitOps deployments, implement policy-as-code admission controls (e.g., OPA Gatekeeper on the policy repo or signed commit verification) to prevent untrusted policy modifications from reaching the cluster, adding CI/CD complexity but blocking the primary threat vector. Network-level mitigation: configure egress network policies to deny Kyverno controller pods from accessing non-essential external endpoints, though this may break legitimate servicecall integrations and requires per-environment tuning. Review and minimize RBAC grants to the Kyverno controller ServiceAccount to reduce blast radius of token exfiltration, recognizing this may limit Kyverno's policy enforcement capabilities depending on required cluster operations.

Affected Packages

go github.com/kyverno/kyverno fix: 1.17.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Kyverno is a Kubernetes policy engine that validates, mutates, and generates resources using declarative policies. The vulnerable component is the context.apiCall.service feature allowing policies to make HTTP requests to external services. The root cause (CWE-441: Unintended Proxy or Intermediary) lies in pkg/engine/apicall/executor.go where the addHTTPHeaders function reads the controller's ServiceAccount token from /var/run/secrets/kubernetes.io/serviceaccount/token and automatically injects it as an Authorization: Bearer header when no explicit Authorization header exists in the policy-defined request. Because ClusterPolicy and GlobalContextEntry allow authors to specify arbitrary service.url values, a malicious or compromised policy can redirect this authenticated request to an attacker-controlled endpoint. Namespaced policies are protected by a urlPath gate that blocks servicecall usage entirely, limiting the attack surface to cluster-scoped resources. The confused deputy pattern emerges because Kyverno acts as a privileged intermediary performing authenticated requests on behalf of policy definitions that should not inherit cluster-admin-level credentials.

Know when Kubernetes gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 8.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
SUSE HIGH

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch released
Apr 16, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 14, 2026 - 20:09 nvd
HIGH 8.1

DescriptionGitHub Advisory

kyverno’s apiCall servicecall helper implicitly injects Authorization: Bearer ... using the kyverno controller serviceaccount token when a policy does not explicitly set an Authorization header. because context.apiCall.service.url is policy-controlled, this can send the kyverno serviceaccount token to an attacker-controlled endpoint (confused deputy).

namespaced policies are blocked from servicecall usage by the namespaced urlPath gate in pkg/engine/apicall/apiCall.go, so this report is scoped to ClusterPolicy and global context usage.

attacker model

the attacker can create or update a ClusterPolicy (or create a GlobalContextEntry) which uses context.apiCall.service.url and can choose the request URL and headers. a cross-boundary framing for real deployments is gitops: if the policy repo/controller is compromised, the ClusterPolicy/global context entry becomes untrusted input to kyverno.

relevant links

  • repository: https://github.com/kyverno/kyverno
  • commit: 17aeb52337fd66adb0c8126213ba076612a287a7
  • callsite (token injection): https://github.com/kyverno/kyverno/blob/17aeb52337fd66adb0c8126213ba076612a287a7/pkg/engine/apicall/executor.go#L150-L173
  • namespaced policy gate (servicecall blocked): https://github.com/kyverno/kyverno/blob/17aeb52337fd66adb0c8126213ba076612a287a7/pkg/engine/apicall/apiCall.go#L67-L83

root cause

in (*executor).addHTTPHeaders, kyverno reads the serviceaccount token from /var/run/secrets/kubernetes.io/serviceaccount/token and injects it when the outgoing request has no Authorization header:

go
if req.Header.Get("Authorization") == "" {
  token := a.getToken()
  if token != "" {
    req.Header.Add("Authorization", "Bearer "+token)
  }
}

proof of concept

the attached poc.zip is a reproducible cluster PoC. it uses an in-cluster HTTP receiver which logs the Authorization header it receives. the PoC does not print token bytes; it only checks that the received header is non-empty and not equal to the negative control.

run (one command):

bash
unzip poc.zip -d poc
cd poc
make test

canonical (expected: implicit token injection):

bash
unzip poc.zip -d poc
cd poc
make canonical

expected output includes:

[CALLSITE_HIT]: executor.addHTTPHeaders Authorization=="" -> read_serviceaccount_token=true
[PROOF_MARKER]: authorization_header_injected=true token_nonempty=true

control (expected: explicit Authorization header disables auto-injection):

bash
unzip poc.zip -d poc
cd poc
make control

expected output includes:

[CALLSITE_HIT]: executor.addHTTPHeaders Authorization!="" -> autoinject_skipped=true
[NC_MARKER]: authorization_header_injected=false

optional: the canonical run may also print an [RBAC]: ... line using kubectl auth can-i with the exfiltrated token, to show concrete privileges without exposing the token.

impact

token exfiltration: the kyverno controller serviceaccount token is sent to a policy-controlled endpoint. impact depends on the rbac bound to that serviceaccount in the target deployment.

recommended fix

do not auto-inject the kyverno serviceaccount token into policy-controlled servicecall requests. require explicit Authorization configuration, or enforce a strict allowlist of destinations where credentials may be attached and document the behavior.

workarounds

  • avoid using servicecall to arbitrary urls in policies.
  • set an explicit Authorization header in servicecall policies to prevent implicit token injection.

poc.zip PR_DESCRIPTION.md

oleh

Executive ViewAI

Why It Matters

Kyverno's apiCall service helper automatically injects Kubernetes cluster ServiceAccount tokens into HTTP requests when policy authors omit authorization headers, creating a confused deputy vulnerability that enables token exfiltration to attacker-controlled endpoints. This affects organizations using Kyverno for policy enforcement, particularly those with GitOps workflows or permissive ClusterPolicy creation permissions, and could allow attackers to compromise cluster credentials and lateral movement within Kubernetes environments.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict RBAC permissions for ClusterPolicy and GlobalContextEntry creation to trusted administrators only; (2) Implement network policies and egress filtering to prevent unexpected HTTP/HTTPS outbound connections from Kyverno controllers; (3) Audit and remove all apiCall directives from existing policies that lack explicit Authorization headers; (4) Enable Kubernetes audit logging to detect unusual token usage patterns; (5) Rotate cluster ServiceAccount tokens used by Kyverno controller pod if compromise is suspected.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Affected Products (CPE)GitHub Advisory

pkg:go/github.com_kyverno_kyverno
CVE-2025-1974 CRITICAL POC
9.8 Mar 25

A critical vulnerability in Kubernetes ingress-nginx controller allows unauthenticated attackers with pod network access

CVE-2026-45321 CRITICAL POC
9.6 May 12

Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio

CVE-2025-1098 HIGH POC
8.8 Mar 25

Kubernetes ingress-nginx contains a configuration injection vulnerability via the mirror-target and mirror-host Ingress

CVE-2025-24514 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-url` Ingres

CVE-2025-1097 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-c

CVE-2020-8554 MEDIUM POC
6.3 Jan 21

Kubernetes API server in all versions allow an attacker who is able to create a ClusterIP service and set the spec.exter

CVE-2023-3676 HIGH POC
8.8 Oct 31

A security issue was discovered in Kubernetes where a user that can create pods on Windows nodes may be able to escalate

CVE-2025-55190 CRITICAL POC
9.9 Sep 04

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Rated critical severity (CVSS 9.9), this vulne

CVE-2026-34976 CRITICAL POC
10.0 Apr 02

Unauthenticated remote attackers can trigger complete database overwrites, server-side file reads, and SSRF attacks agai

CVE-2018-18843 CRITICAL POC
10.0 Dec 04

The Kubernetes integration in GitLab Enterprise Edition 11.x before 11.2.8, 11.3.x before 11.3.9, and 11.4.x before 11.4

CVE-2026-54680 CRITICAL POC
9.9 Jul 29

Fluentd configuration injection in the kube-logging Logging operator before 6.6.0 allows a namespace-scoped user who can

CVE-2025-64709 CRITICAL POC
9.9 Nov 13

Authenticated Typebot users can abuse the webhook block (HTTP Request component) in versions prior to 3.13.1 to issue ar

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy