Summary
Argo Workflows contains an authorization bypass where users with permission to create Workflows can circumvent the templateReferencing: Strict control and inject privileged pod-level settings.
Under these conditions, an attacker may gain host network access, switch service accounts, adjust pod security context, target control-plane nodes, or re-enable service account token mounting, depending on cluster-level defenses.
Affected context
This vulnerability manifests in Kubernetes clusters running Argo Workflows that:
- Rely on
templateReferencing: Strictto constrain what workflow authors can override - Allow certain users or tenants to create or submit Workflows
- Do not have comprehensive, independent Kubernetes-level policy enforcement (e.g., PodSecurity admission, OPA/Gatekeeper) for host networking, service accounts, and pod security contexts
In such environments, the assumption that Strict mode prevents workflows from escalating privileges or altering sensitive pod configuration does not hold.
Exploit preconditions
- Attack surface: Argo Workflows API / controller via Workflow submission
- Required access: Ability to create or submit a Workflow object in a namespace where Argo is installed
- Control in scope:
templateReferencing: Strictis configured and expected to limit user-controlled pod specs - Trigger point: Crafting a Workflow that references templates or fields in ways that bypass the Strict enforcement, allowing direct specification of:
hostNetworkor related network fieldsserviceAccountNameor pod-level service account usage- Pod
securityContext, tolerations, or node selectors - Service account token mounting options
- Why exploitation is possible: The Strict mode enforcement logic does not comprehensively validate or restrict all pod-level configuration paths that can be influenced by a Workflow, enabling users with create permissions to inject higher-privilege settings than intended.
Why this happens
The underlying issue aligns with CWE-863: Incorrect Authorization, where a security feature is present but incompletely enforced.
Argo's templateReferencing: Strict mode is intended to limit what Workflow definitions can override from reusable templates, acting as a guardrail for pod-level privileges. However, the implementation fails to account for all ways a Workflow can influence the resulting pod spec. Certain fields—such as host networking, service accounts, pod security context, tolerations, and service account token mounting—were either insufficiently validated or left outside the strict enforcement boundary.
Conceptually, this is a design-level access control bug: enforcement is applied at some abstraction layer (workflow templates), but lower-level or alternate configuration paths remain exposed. As a result, users who are supposed to operate within constrained templates can escalate their effective runtime privileges by manipulating overlooked fields.
Potential impact
- Users with Workflow creation permissions may gain host network access on Kubernetes nodes.
- Attackers could switch the pod's service account to one with broader RBAC permissions, leading to cluster-level privilege escalation.
- Workflows may run with a more permissive pod security context (e.g., elevated capabilities, privileged containers).
- Tolerations can be added to schedule workloads onto control-plane or otherwise restricted nodes.
- Service account token mounting can be enabled, allowing access to Kubernetes API tokens that were meant to be disabled.
- Defense-in-depth assumptions relying on Argo's Strict mode may be invalidated, increasing reliance on upstream Kubernetes policy controls.
General mitigation guidance
Addressing this class of issue generally involves strengthening how access control and configuration guardrails are implemented:
- Treat Argo's configuration constraints (
templateReferencing: Strictand similar features) as secondary controls, and ensure primary enforcement is done at the Kubernetes layer using: - PodSecurity/PSS profiles
- Admission webhooks
- Policy engines such as OPA/Gatekeeper or Kyverno
- Design authorization checks to cover the full configuration surface:
- Enumerate all pod-spec fields that affect privileges or isolation (hostNetwork, hostPID/IPC, service accounts, securityContext, volume types, tolerations, node selectors, token mounts).
- Enforce strict validation or deny-by-default behavior for fields not explicitly allowed.
- Apply least-privilege principles to Workflow authors:
- Separate roles for Workflow submission and cluster administration.
- Limit which namespaces and service accounts workflows can use by policy rather than convention.
- Use template systems that define a minimal, locked-down pod template and only expose safe parameters, with explicit validation of all user-provided inputs.
These patterns reduce reliance on a single feature flag and help ensure configuration bypasses do not automatically lead to privilege escalation.
How teams detect issues like this
Organizations can detect and monitor for this class of authorization bypass by combining policy, analysis, and review:
- Configuration and policy review:
- Inspect Argo configurations where
templateReferencing: Strictis enabled and identify assumptions about what users can or cannot override. - Review Kubernetes admission policies (PodSecurity, OPA/Gatekeeper, Kyverno) to ensure host networking, service account selection, privileged pods, and token mounting are explicitly governed.
- Static and configuration analysis:
- Use policy-as-code tools to scan existing Workflows and templates for:
- Direct specification of
hostNetwork,serviceAccountName, podsecurityContext, tolerations, or token-related settings by non-admin users. - Patterns where workflow-level parameters map directly to sensitive pod-spec fields.
- Runtime monitoring:
- Log and audit Workflow submissions and resulting Pods, flagging:
- Workloads requesting host networking or privileged contexts.
- Workflows running under unexpected service accounts.
- Pods scheduled onto control-plane nodes or restricted node pools.
- Automated review in CI/CD:
- Integrate automated checks that block or require approval for workflows containing sensitive pod-spec fields.
- Employ security-focused linters or admission test harnesses that simulate policy evaluation as part of the development pipeline.

