nebari-dev / nebari-dev/data-science-pack

Security(M-04): optional NFS client-installer DaemonSet mutates every node with host privileges

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: security priority: medium ⚡
Dominant language
Python
Stars
5
Forks
7
Avg merge
1d 20h
Merged PRs (30d)
13

Description

Summary

The optional NFS client installer creates a DaemonSet that mutates every node. It uses hostPID, hostNetwork, all-node tolerations, and a privileged init container that nsenters into PID 1 to run apt-get install nfs-common, from mutable base image tags. This is a node-administration mechanism shipped inside an application chart. It is off by default.

Severity: Medium · CWE-250 (Execution with Unnecessary Privileges)
Validation: Confirmed against HEAD f932d80 on 2026-07-14 (assessed at 69c84f7; unchanged since).

Evidence

  • Opt-in / disabled by default: values.yaml:203 installClient: false; templates/nfs-client-installer.yaml:1 requires sharedStorage.nfsServer.installClient (on top of sharedStorage + nfsServer) to render.
  • DaemonSet spec: templates/nfs-client-installer.yaml:7 (kind DaemonSet), :23 hostPID: true, :24 hostNetwork: true, :25-26 all-node toleration (operator: Exists).
  • Privileged host mutation: nfs-client-installer.yaml:28-47 runs nsenter -t 1 -- bash -c 'apt-get update && apt-get install -y nfs-common' with securityContext: {privileged: true}.
  • Mutable tags: ubuntu:22.04 (:29) and alpine:3 (:50), no digests.

Impact

Compromise of the image, the package mirror, or the DaemonSet spec can execute arbitrary host commands across every node and persist changes outside Kubernetes rollback. The blast radius is the node fleet, not a single application pod.

Remediation

  • Provision prerequisites in node images or infrastructure automation.
  • If retained as an emergency tool, separate it from the application chart, pin images and packages, restrict nodes, require manual approval, record mutations, and remove it immediately after verification.

Acceptance criteria

  • Production chart installation cannot create a hostPID/hostNetwork privileged DaemonSet.

Related

  • #129 lists this template alongside nfs-server.yaml as running privileged, but only asks to document the justification. This issue is about removing host mutation from the application chart.

Source: data-science-pack 0.1.0 security assessment (pinned commit 69c84f72df259ec755ed40bfc83f20158c550d55), finding M-04.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with values.yaml:203 and templates/nfs-client-installer.yaml, then render the chart with the shared storage and NFS installer options enabled. Verify the resulting production manifests cannot create the installer DaemonSet with hostPID, hostNetwork, or privileged execution, and confirm the acceptance criterion is met.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, yaml
Domain
devops, infrastructure, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.