Summary
An authorization bypass in Argo Workflows allows users who can submit Workflows to override admin-approved security settings defined in WorkflowTemplates by abusing the podSpecPatch field.
Because the patch is applied directly to the pod spec at creation time without security validation, it can negate restrictions even when templateReferencing: Strict is enabled, undermining expected multi-tenant isolation and policy controls.
Affected context
This vulnerability arises in Argo Workflows deployments where:
- Users are permitted to submit or modify Workflow objects, often in multi-tenant or shared clusters.
- Workflow setups rely on
WorkflowTemplateresources to encapsulate and enforce security controls such as container images, volumes, and resource limits. - The controller is configured with
templateReferencing: Strictto constrain users to admin-approved templates.
In affected versions, the podSpecPatch field on a Workflow submission takes precedence during spec merging, effectively allowing users to bypass the intended restrictions defined in referenced WorkflowTemplates.
Exploit preconditions
- Attack surface: Kubernetes API surface where Argo Workflow CRDs (e.g., Workflow objects) are submitted.
- Required access: Ability to create or update Workflow resources in the cluster (no cluster-admin required; typical "workflow submitter" role is sufficient).
- Trigger point: Submission of a Workflow referencing a WorkflowTemplate while including a crafted
podSpecPatchthat modifies the resulting Pod specification. - Why exploitation is possible: The controller merges
podSpecPatchinto the final Pod spec with higher precedence than the referenced WorkflowTemplate and performs no dedicated security validation or policy re-enforcement for the patched fields, enabling effective circumvention oftemplateReferencing: Strictcontrols.
Why this happens
The bug stems from a flawed authorization and policy enforcement design where user-provided input (podSpecPatch) is allowed to override security-critical portions of the Pod spec that are supposed to be governed by trusted WorkflowTemplates.
During spec merging, the system:
- Treats the
podSpecPatchas authoritative, applying it directly at Pod creation time. - Does not re-apply or validate security policies against the merged result.
This aligns with CWE-863: Incorrect Authorization, because the system assumes that enforcement of templateReferencing: Strict and the use of templates is sufficient, yet it fails to account for an alternative update path (podSpecPatch) that effectively grants users broader control than intended over the resulting workload configuration.
Potential impact
- Users may bypass security controls encoded in WorkflowTemplates, such as:
- Approved container images
- Resource limits and requests
- Volume mounts and hostPath restrictions
- Workflows could be configured with elevated privileges (e.g., privileged containers, additional capabilities, or service accounts).
- Increased risk of lateral movement inside the cluster if more permissive Pod specs can be injected.
- Potential non-compliance with organizational policies that rely on strict template-based enforcement.
- Erosion of trust in multi-tenant isolation where template-based workflows are assumed to be controlled by administrators.
General mitigation guidance
Long-term risk reduction focuses on eliminating bypass channels around template-based policy enforcement and minimizing trust in user-controlled fields:
- Revisit authorization models so that users who are restricted to admin-approved templates cannot modify the effective Pod spec in ways that circumvent those restrictions.
- Restrict or disallow use of
podSpecPatchfor untrusted tenants or in namespaces that depend ontemplateReferencing: Strictfor security guarantees. - Employ admission control and policy engines (e.g., validating admission policies, policy-as-code) to validate the final Pod spec after all merges and patches have been applied, not only the template.
- Favor declarative, centrally managed security guardrails such as runtime policies, Pod security restrictions, and namespace-level controls that do not rely solely on application-layer templates.
- Implement least-privilege for workflow submitter roles so that the ability to create Workflows does not implicitly allow altering high-risk Pod attributes.
How teams detect issues like this
Detection typically requires visibility into Workflow submissions and the resulting Pod specifications:
- Use cluster-wide policy engines or admission controllers to inspect the merged Pod spec and flag or deny Pods that deviate from allowed profiles (e.g., unexpected images, privileged flags, or hostPath volumes).
- Add static or configuration analysis rules that detect use of
podSpecPatchin Workflow manifests, especially in contexts where template-based security is expected. - During code or configuration review, treat any ability to mutate Pod specs outside of trusted templates as a high-risk pattern and require explicit justification and additional guardrails.
- Integrate automated configuration scanning into CI/CD pipelines to catch Workflow definitions that rely on
podSpecPatchto modify security-sensitive fields.

