CVE-2026-42296: Argo has incomplete fix for CVE-2026-31892: hostNetwork, securityContext, serviceAccountName bypass templateReferencing Strict/Secure
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.
The check in setExecWorkflow gates on HasPodSpecPatch() only:
if woc.controller.Config.WorkflowRestrictions.MustUseReference() && woc.wf.Spec.HasPodSpecPatch() {
Everything else passes through. createWorkflowPod reads hostNetwork, securityContext, serviceAccountName, tolerations, and automountServiceAccountToken from the merged spec and applies them directly to the pod.
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.
Both 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.
References
- github.com/advisories/GHSA-3775-99mw-8rp4
- github.com/argoproj/argo-workflows
- github.com/argoproj/argo-workflows/commit/2727f3f701677d467dfb5e053c57237cbc752c3c
- github.com/argoproj/argo-workflows/releases/tag/v4.0.5
- github.com/argoproj/argo-workflows/security/advisories/GHSA-3775-99mw-8rp4
- github.com/argoproj/argo-workflows/security/advisories/GHSA-3wf5-g532-rcrr
- nvd.nist.gov/vuln/detail/CVE-2026-42296
Code Behaviors & Features
Detect and mitigate CVE-2026-42296 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →