Home/Research/Post

GHSA-jw3m-8q7m-f35r: LLMKube: Arbitrary Host File Read via Model.spec.source hostPath Injection

  • Severity: HIGH
  • CVE: CVE-2026-68903
  • Ecosystems: go
  • Packages: github.com/defilantech/llmkube

### Summary

LLMKube’s `ModelReconciler` accepts arbitrary absolute paths and `file://` URIs in the `Model.spec.source` field and propagates them to two distinct sinks without path allowlisting: (1) `os.Open()` inside the controller pod itself (`copyLocalModel`), and (2) a Kubernetes `HostPathVolumeSource` that mounts the attacker-supplied path into the inference pod’s init container. Any namespace user with permission to create or update `Model` and `InferenceService` custom resources can read arbitrary files accessible to the controller pod (e.g., the controller’s own Kubernetes service-account token) or arbitrary files on the node where the inference pod is scheduled (e.g., `/etc/kubernetes/kubelet.conf`). Model caching, the feature that activates the `hostPath` sink, is **enabled by default** in both the CLI and the official Helm chart. CVSS v3.1 Base Score: **7.7 (High)**.

### Details

**Entry point — `Model.spec.source` field**

The `Source` field in `api/v1alpha1/model_types.go:47-48` carries a `kubebuilder` validation pattern that explicitly permits absolute paths:

“`go
// +kubebuilder:validation:Pattern=`^(https?|file|pvc|hf)://.*|^/[^\s]+$|^[a-zA-Z0-9][\w\-\.\/]+$`
Source string `json:”source”`
“`

The branch `^/[^\s]+$` matches any non-whitespace absolute path on the host.

**Sink 1 — Controller-pod arbitrary file read (`copyLocalModel`)**

`internal/controller/source.go:93-103` classifies a source as local and extracts the path with no sanitization:

“`go
//…

Source: GitHub Security Advisories · 2026-11-18