Severity:

CRITICAL RISK

(9.8)

Server-Side Request Forgery (SSRF) in Kyverno

CVE-2026-4789

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Network Pivot / Access to Internal Services via SSRF from the Kubernetes Control Plane Context

Severity:

CRITICAL RISK

(9.8)

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 versions 1.16.0 and later contain a server-side request forgery (SSRF) weakness where CEL HTTP functions can be used without sufficient restriction.

Under certain policy configurations, an attacker can abuse these HTTP capabilities to make arbitrary network requests from the Kyverno control-plane context, potentially reaching internal or otherwise unreachable services.

Affected context

This vulnerability appears in Kyverno policy evaluations that leverage Common Expression Language (CEL) HTTP functions to fetch or validate external resources.

It is most relevant where:

  • Kyverno is granted network egress to internal services or metadata endpoints.
  • Policies allow user-controlled or partially trusted input to influence CEL expressions.
  • HTTP targets are not restricted to trusted domains or IP ranges.

In such conditions, Kyverno's policy engine can be misused as an HTTP client to reach internal network locations that an external attacker could not directly access.

Exploit preconditions

  • Attack surface: Kyverno admission and policy evaluation paths, particularly policies using CEL HTTP functions.
  • Required access: Ability to create, modify, or indirectly influence Kyverno policies or the data they evaluate (e.g., through Kubernetes API access, tenant namespaces, or misconfigured multi-tenant clusters).
  • Trigger point: Execution of CEL expressions that invoke HTTP functions during resource admission, mutation, or validation.
  • Why exploitation is possible: HTTP capabilities exposed to CEL are not sufficiently constrained (e.g., by host allow-lists, scheme restrictions, or metadata endpoint protections), letting attacker-controlled parameters drive outbound requests from a privileged network position.

Why this happens

The core issue is the exposure of powerful HTTP functionality inside CEL expressions without enforcing strict network and target constraints.

This aligns with CWE-918: Server-Side Request Forgery (SSRF), where a server-side component (here, Kyverno's policy engine) is tricked into initiating network requests defined or influenced by an attacker.

Conceptually, the bug class is:

  • Treating user-influenced data as safe input to low-level HTTP APIs.
  • Failing to validate or restrict where these HTTP calls can go (IP ranges, protocols, ports, hostnames).
  • Running these calls from a context that has broader network visibility than the attacker, thereby amplifying the attacker's reach into internal networks and services.

Potential impact

  • Kyverno may be used as an HTTP proxy to reach internal microservices or cluster control-plane components not exposed externally.
  • Attackers could query cloud or Kubernetes metadata endpoints that are only reachable from within the cluster or node environment.
  • Sensitive configuration details, service responses, or internal APIs could be exfiltrated via SSRF-induced requests.
  • SSRF may enable secondary attacks, such as authentication bypass on internal-only services that trust cluster-local traffic.
  • In some environments, chained with other misconfigurations, SSRF could contribute to broader cluster compromise or lateral movement.

General mitigation guidance

Effective mitigation focuses on enforcing strict control over where CEL HTTP functions can connect and how input flows into them.

Recommended defensive patterns include:

  • Network egress restrictions: Use Kubernetes network policies, service meshes, or firewall rules to limit Kyverno's outbound traffic to a minimal set of trusted endpoints.
  • Domain and IP allow-lists: Constrain HTTP targets to approved domains or IP ranges in policy design; avoid dynamic construction of URLs from untrusted fields.
  • Reduce input trust: Avoid passing raw or minimally validated user input into CEL HTTP URL parameters, headers, or bodies; perform strict normalization and whitelisting of allowed values.
  • Policy hardening: Limit or avoid patterns where tenant-controlled namespaces or less-trusted operators can define or modify Kyverno policies that use external HTTP calls.
  • Least privilege for Kyverno: Run Kyverno with the smallest necessary network and API privileges, and separate roles or instances if different trust levels are required.

How teams detect issues like this

Organizations can look for this class of issue using a mix of code/policy review and runtime monitoring:

  • Policy review: Search Kyverno policies for CEL expressions invoking HTTP functions, especially where URLs or request parameters include user-supplied fields (annotations, labels, spec fields).
  • Static analysis / linting: Introduce custom linters or policy-as-code checks that flag unrestricted HTTP usage in CEL expressions or disallow high-risk destinations (e.g., link-local, 169.254.0.0/16, RFC1918).
  • Network monitoring: Inspect outbound traffic from Kyverno pods for unexpected destinations or unusual patterns and trigger alerts on connections to internal control-plane, metadata, or management endpoints.
  • Change control enforcement: Require security review for any new or modified Kyverno policy that leverages CEL HTTP functions, supported by automated checks in CI/CD.

Sources

SourceLink
github.comgithub.com/kyverno/kyverno
kb.cert.orgkb.cert.org/vuls/id/655822
portswigger.netportswigger.net/web-security/ssrf
kb.cert.orgkb.cert.org/vuls/id/655822

Frequently asked

questions

Yes, in many deployments. If an external user or tenant can create or influence resources or Kyverno policies that trigger CEL HTTP functions, they may abuse Kyverno as an SSRF proxy, even without direct access to internal services.

The attacker generally needs Kubernetes API access sufficient to affect the inputs Kyverno evaluates (e.g., creating or modifying resources) or the policies themselves.

In multi-tenant setups, tenant-level permissions may be enough if policies are not carefully separated or constrained.

Combine strong network egress controls on Kyverno with policy-level restrictions on HTTP usage.

In many environments, the safest pattern is to tightly restrict or eliminate external HTTP calls from Kyverno policies, or allow only a small, auditable set of trusted endpoints.

Treat any server-side HTTP capability as a high-risk feature when it can be influenced by user input:

  • Apply allow-lists for destinations.
  • Validate and sanitize all parameters.
  • Enforce defense-in-depth via network segmentation and least privilege.
  • Integrate security review and automated checks for policy-as-code changes that introduce new network interactions.
Find out what's already
exploitable in your codebase.