nebari-dev / nebari-dev/data-science-pack
Security(M-04): optional NFS client-installer DaemonSet mutates every node with host privileges
Nobody has claimed this yet.
- 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:203installClient: false;templates/nfs-client-installer.yaml:1requiressharedStorage.nfsServer.installClient(on top of sharedStorage + nfsServer) to render. - DaemonSet spec:
templates/nfs-client-installer.yaml:7(kind DaemonSet),:23hostPID: true,:24hostNetwork: true,:25-26all-node toleration (operator: Exists). - Privileged host mutation:
nfs-client-installer.yaml:28-47runsnsenter -t 1 -- bash -c 'apt-get update && apt-get install -y nfs-common'withsecurityContext: {privileged: true}. - Mutable tags:
ubuntu:22.04(:29) andalpine: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/hostNetworkprivileged DaemonSet.
Related
- #129 lists this template alongside
nfs-server.yamlas 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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